From 1570c333938899b5a74cb687fbb475d26af347a0 Mon Sep 17 00:00:00 2001 From: Louie S Date: Thu, 31 Aug 2023 15:52:28 -0400 Subject: Backport some keymaps to vim-compatible config --- old_0.4.4/init.vim | 60 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 21 deletions(-) (limited to 'old_0.4.4') 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 K :call show_documentation() -" -"function! s:show_documentation() -" if (index(['vim','help'], &filetype) >= 0) -" execute 'h '.expand('') -" elseif (coc#rpc#ready()) -" call CocActionAsync('doHover') -" else -" execute '!' . &keywordprg . " " . expand('') -" endif -"endfunction +"Remap space as leader key +noremap +let mapleader = " " +let maplocalleader = " " + +"-- Normal -- +"Better window navigation (both hjkl and arrow keys) +nnoremap h +nnoremap j +nnoremap k +nnoremap l +nnoremap h +nnoremap j +nnoremap k +nnoremap l +"Better tab navigation (both hjkl and arrow keys) +nnoremap gt +nnoremap gt +nnoremap gT +nnoremap gt +"Navigate buffers +nnoremap :bnext +nnoremap :bprevious +"Resize with ctrl+shift+arrows +nnoremap :resize -2 +nnoremap :resize +2" +nnoremap :vertical resize -2 +nnoremap :vertical resize +2 + +"Buffer Options +"Close buffer without closing window ('b'uffer 'd'elete) +nnoremap bd :b#:bd# + +"Workspace Options +"Horizontal split workspace ('s'plit 'h'orizontal) +nnoremap wsh :split +"Vertical split workspace ('s'plit 'v'ertical) +nnoremap wsv :vs -- cgit