summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-06-26 11:40:45 -0400
committerSquibid <me@zacharyscheiman.com>2023-06-26 11:40:45 -0400
commit9a2959b394fbe9ec15ecd7dbcc22dfe85133537e (patch)
tree13d188cf507c1f1487ea901e3307a4ebfbd1d758
parentfad8040f48aa9da8ddb889076eff2a0bf610849e (diff)
downloadnvim-9a2959b394fbe9ec15ecd7dbcc22dfe85133537e.tar.gz
nvim-9a2959b394fbe9ec15ecd7dbcc22dfe85133537e.tar.bz2
nvim-9a2959b394fbe9ec15ecd7dbcc22dfe85133537e.zip
comment position in binds.lua
-rw-r--r--lua/core/binds.lua16
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()