diff options
Diffstat (limited to '.config/nvim/lua/mappings.lua')
-rw-r--r-- | .config/nvim/lua/mappings.lua | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua deleted file mode 100644 index bc7f380..0000000 --- a/.config/nvim/lua/mappings.lua +++ /dev/null @@ -1,58 +0,0 @@ -vim.api.nvim_set_keymap('n', '-', ':RnvimrToggle<CR>', {noremap = true, silent = true}) - --- better window movement -vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true}) - --- TODO fix this --- Terminal window navigation -vim.cmd([[ - tnoremap <C-h> <C-\><C-N><C-w>h - tnoremap <C-j> <C-\><C-N><C-w>j - tnoremap <C-k> <C-\><C-N><C-w>k - tnoremap <C-l> <C-\><C-N><C-w>l - inoremap <C-h> <C-\><C-N><C-w>h - inoremap <C-j> <C-\><C-N><C-w>j - inoremap <C-k> <C-\><C-N><C-w>k - inoremap <C-l> <C-\><C-N><C-w>l - tnoremap <Esc> <C-\><C-n> -]]) - --- TODO fix this --- resize with arrows -vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -2<CR>', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +2<CR>', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize -2<CR>', {silent = true}) -vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize +2<CR>', {silent = true}) - --- better indenting -vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true, silent = true}) -vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true, silent = true}) - --- I hate escape -vim.api.nvim_set_keymap('i', 'jk', '<ESC>', {noremap = true, silent = true}) -vim.api.nvim_set_keymap('i', 'kj', '<ESC>', {noremap = true, silent = true}) -vim.api.nvim_set_keymap('i', 'jj', '<ESC>', {noremap = true, silent = true}) - --- Tab switch buffer -vim.api.nvim_set_keymap('n', '<TAB>', ':bnext<CR>', {noremap = true, silent = true}) -vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true}) - --- Move selected line / block of text in visual mode -vim.api.nvim_set_keymap('x', 'K', ':move \'<-2<CR>gv-gv', {noremap = true, silent = true}) -vim.api.nvim_set_keymap('x', 'J', ':move \'>+1<CR>gv-gv', {noremap = true, silent = true}) - --- Better nav for omnicomplete -vim.cmd('inoremap <expr> <c-j> (\"\\<C-n>\")') -vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")') - --- fix to get netrw's gx command to work correctly -vim.api.nvim_set_keymap('n', 'gx', ":call netrw#BrowseX(expand((exists('g:netrw_gx')? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>", {noremap = true, silent = true}) - -vim.cmd('vnoremap p "0p') -vim.cmd('vnoremap P "0P') - --- Toggle the QuickFix window -vim.api.nvim_set_keymap('', '<C-q>', ':call QuickFixToggle()<CR>', {noremap = true, silent = true}) |