nvim: add config files
This commit is contained in:
31
nvim/lua/config/keybinds.lua
Normal file
31
nvim/lua/config/keybinds.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
-- Set leader key to Space
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
-- When lsp-signature (or any other vsnip snippet) is active, press TAB to jump
|
||||
-- to the next placehol
|
||||
--imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
||||
--smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
||||
|
||||
--imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
||||
--smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
||||
|
||||
-- Map semicolon to colon, so you don't have to press shift to enter commands
|
||||
vim.keymap.set('n', ';', ':')
|
||||
|
||||
-- Map shift-space to underscore
|
||||
--vim.keymap.set('i', '<S-Space>', '_')
|
||||
|
||||
vim.keymap.set('n', 'H', function() vim.cmd('wincmd h') end, { remap = true })
|
||||
vim.keymap.set('n', 'J', function() vim.cmd('wincmd j') end, { remap = true })
|
||||
vim.keymap.set('n', 'K', function() vim.cmd('wincmd k') end, { remap = true })
|
||||
vim.keymap.set('n', 'L', function() vim.cmd('wincmd l') end, { remap = true })
|
||||
|
||||
vim.keymap.set('n', '<C-h>', function() vim.cmd('vertical resize -1') end, {})
|
||||
vim.keymap.set('n', '<C-j>', function() vim.cmd('horizontal resize -1') end, {})
|
||||
vim.keymap.set('n', '<C-k>', function() vim.cmd('horizontal resize +1') end, {})
|
||||
vim.keymap.set('n', '<C-l>', function() vim.cmd('vertical resize +1') end, {})
|
||||
|
||||
--nmap <silent> <C-t> :ToggleTerm<CR>
|
||||
--imap <silent> <C-t> :ToggleTerm<CR>
|
||||
|
||||
--nmap <silent> t :ToggleTerm<CR>
|
||||
Reference in New Issue
Block a user