diff options
Diffstat (limited to '')
-rw-r--r-- | lua/core/binds.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lua/core/binds.lua b/lua/core/binds.lua index 0783615..638539f 100644 --- a/lua/core/binds.lua +++ b/lua/core/binds.lua @@ -23,27 +23,23 @@ end -- vim binds ------------------------------------------------------------------ g.mapleader = ' ' -- set leader key --- greatest remap ever -map('x', '<leader>p', [["_dP]]) - --- clear search -map('n', '<ESC>', ':nohlsearch<Bar>:echo<CR>') - +map('x', '<leader>p', [["_dP]]) -- greatest remap ever +map('n', '<ESC>', ':nohlsearch<Bar>:echo<CR>') -- clear search +map('t', '<ESC>', '<C-\\><C-n>') -- make <ESC> work in terminals -- move selected text up/down map('v', '<S-k>', ":m '<-2<CR>gv=gv") map('v', '<S-j>', ":m '>+1<CR>gv=gv") -- the cursor STAYS IN THE MIDDLE map('n', '<S-j>', 'mzJ`z<cmd>delm z<CR>') -- when combining lines -map('n', 'n', 'nzzzv') -- searching +map('n', 'n', 'nzzzv') -- when searching map('n', 'N', 'Nzzzv') map('n', '<C-d>', '<C-d>zz') -- half page jumping map('n', '<C-u>', '<C-u>zz') --- execute order 111 -map('n', '<leader>x', '<cmd>!chmod +x %<CR>') +map('n', '<leader>x', '<cmd>!chmod +x %<CR>') -- execute order 111 --- add some keybinds to the file view +-- add some keybinds to the file view (netrw) a.nvim_create_autocmd('FileType', { pattern = 'netrw', callback = function() |