diff options
author | Louie S <louie@example.com> | 2023-08-31 15:52:28 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-08-31 15:52:28 -0400 |
commit | 1570c333938899b5a74cb687fbb475d26af347a0 (patch) | |
tree | 2b3b6b4cc26f9c2bcf851acce8f0e11e7aabfaa3 | |
parent | a393feb16bd85c7d0643f756375c0540ca73834b (diff) |
Backport some keymaps to vim-compatible config
-rw-r--r-- | old_0.4.4/init.vim | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/old_0.4.4/init.vim b/old_0.4.4/init.vim index b1e7211..3c61fee 100644 --- a/old_0.4.4/init.vim +++ b/old_0.4.4/init.vim @@ -13,25 +13,43 @@ set foldlevelstart=20 "Pmenu Settings (Popup Menu) highlight Pmenu ctermbg=White ctermfg=Black guibg=Gray +"-- Custom keybinds -- -"" Plugins -"call plug#begin("~/.local/share/nvim/plugged") -" -"Plug 'neoclide/coc.nvim', {'branch': 'release'} -" -"call plug#end() -" -"" Settings for coc -" -"" Use K to show documentation in preview window. -"nnoremap <silent> K :call <SID>show_documentation()<CR> -" -"function! s:show_documentation() -" if (index(['vim','help'], &filetype) >= 0) -" execute 'h '.expand('<cword>') -" elseif (coc#rpc#ready()) -" call CocActionAsync('doHover') -" else -" execute '!' . &keywordprg . " " . expand('<cword>') -" endif -"endfunction +"Remap space as leader key +noremap <Space> <Nop> +let mapleader = " " +let maplocalleader = " " + +"-- Normal -- +"Better window navigation (both hjkl and arrow keys) +nnoremap <C-h> <C-w>h +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-l> <C-w>l +nnoremap <C-Left> <C-w>h +nnoremap <C-Down> <C-w>j +nnoremap <C-Up> <C-w>k +nnoremap <C-Right> <C-w>l +"Better tab navigation (both hjkl and arrow keys) +nnoremap <S-h> gt +nnoremap <S-l> gt +nnoremap <S-Left> gT +nnoremap <S-Right> gt +"Navigate buffers +nnoremap <S-Down> :bnext<CR> +nnoremap <S-Up> :bprevious<CR> +"Resize with ctrl+shift+arrows +nnoremap <C-S-Up> :resize -2<CR> +nnoremap <C-S-Down> :resize +2<CR>" +nnoremap <C-S-Left> :vertical resize -2<CR> +nnoremap <C-S-Right> :vertical resize +2<CR> + +"Buffer Options +"Close buffer without closing window ('b'uffer 'd'elete) +nnoremap <leader>bd :b#<CR>:bd#<CR> + +"Workspace Options +"Horizontal split workspace ('s'plit 'h'orizontal) +nnoremap <leader>wsh :split<CR> +"Vertical split workspace ('s'plit 'v'ertical) +nnoremap <leader>wsv :vs<CR> |