diff --git a/nvim/lua/opdavies/keymaps.lua b/nvim/lua/opdavies/keymaps.lua index 8044134..9cc34f9 100644 --- a/nvim/lua/opdavies/keymaps.lua +++ b/nvim/lua/opdavies/keymaps.lua @@ -1,11 +1,5 @@ local set = vim.keymap.set -set("n", "so", ":call opdavies#save_and_exec()") - --- Format paragraphs to an 80 character line length. -set("n", "g", "gqap") -set("x", "g", "gqa") - -- Execute Lua in the current file, line or range. set("n", "x", "source %") set("n", "x", ":.lua") @@ -22,10 +16,6 @@ set("n", "N", "Nzzzv") set("v", "", "") set("v", "", "") --- Use the left and right arrow keys to change tabs. -set("v", "", "gT") -set("v", "", "gt") - -- Easily switch back to visual mode. set("i", "jk", "") @@ -33,12 +23,6 @@ set("i", "jk", "") set("i", ",,", "A,") set("i", ";;", "A;") -set("n", "ga", "(EasyAlign)") -set("x", "ga", "(EasyAlign)") - --- Focus on the current buffer. -set("n", "-", ":wincmd _:wincmd |", { noremap = true, silent = true }) - -- Automatically resize buffers. set("n", "=", ":wincmd =", { noremap = true, silent = true }) @@ -73,12 +57,6 @@ vim.cmd [[ nnoremap {-> v:hlsearch ? ":nohl\" : "\"}() ]] set("n", "Q", "@qj") set("x", "Q", ":norm @q") --- Easier navigation between splits. -set("n", "", "") -set("n", "", "") -set("n", "", "") -set("n", "", "") - set("v", "Q", "") set("v", "J", ":m '>+1gvrgv") @@ -90,28 +68,7 @@ set("n", "", "zz") set("n", "n", "nzzzv") set("n", "N", "Nzzzv") --- Easily access project-specific notes. -set("n", "en", function() - if vim.fn.filereadable ".ignored/notes" == 1 then - vim.cmd "tabnew .ignored/notes" - else - vim.cmd "tabnew notes" - end -end) - --- Easily access project-specific todos. -set("n", "et", function() - if vim.fn.filereadable ".ignored/todo" == 1 then - vim.cmd "tabnew .ignored/todo" - else - vim.cmd "tabnew todo" - end -end) - set("n", "ec", ":edit composer.json") --- These mappings control the size of splits (height/width). -set("n", "", "5<") -set("n", "", "5>") -set("n", "", "+") -set("n", "", "-") +set({ "n", "v" }, "y", [["+y]]) +set("n", "Y", [["+Y]]) diff --git a/nvim/lua/opdavies/options.lua b/nvim/lua/opdavies/options.lua index 4702b28..3bdd40d 100644 --- a/nvim/lua/opdavies/options.lua +++ b/nvim/lua/opdavies/options.lua @@ -46,7 +46,6 @@ for key, value in pairs(settings) do end vim.opt.backupdir:remove "." -- keep backups out of the current directory -vim.opt.clipboard:append "unnamedplus" vim.opt.completeopt = { "menu", "menuone", "noinsert", "noselect" } vim.opt.listchars:append { trail = "ยท",