From ca8553d77778f49ab7a6bc227cbe009b79e6f18a Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 28 Mar 2024 17:44:30 -0400 Subject: [PATCH] Remove the split 33% and 66% stuff as it's really not that useful, remove the binding that had ~ run :TCommand as this is no longer included, and rather than having toggle folding and fold the current point, use ~ to toggle folds without closing any of them (at which point normal bindings or the mouse can be used) --- readme.md | 7 ++++--- vim/config/keyboard.vim | 37 ++++++++++++++----------------------- vim/config/settings.vim | 34 ---------------------------------- 3 files changed, 18 insertions(+), 60 deletions(-) diff --git a/readme.md b/readme.md index 1fce358..2484ea8 100644 --- a/readme.md +++ b/readme.md @@ -64,6 +64,8 @@ A theme, config and collection of plugins for Neovim ### Keyboard +A more complete list of key bindings exists at the top of `vim/config/keyboard.vim` + #### Sidebars | Binding | Mode | Action | @@ -76,14 +78,13 @@ A theme, config and collection of plugins for Neovim | Binding | Mode | Action | |-----------------|------|-------------------------------------------------| -| ~ | N | Popup a command list dialog | +| \` | N | Toggle gutter (left bar with line numbers, etc) | +| ~ | N | Toggle code the code folding sidebar | | | | | | F1 | ALL | Toggle line wrapping | | F2 | ALL | Toggle highlighting of spelling mistakes | | F3 | ALL | Toggle external-paste mode | | F4 | ALL | Toggle source code syntax checking | -| | | | -| \` | N | Toggle gutter (left bar with line numbers etc.) | #### Spell Check diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 5a85bb2..b2d9dd8 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -41,14 +41,12 @@ " | (N) -> open a new tab " " (split) +" ] | (N) -> split vertically +" [ | (N) -> split horizontally +" +" (rotate) " { | (N) -> rotate counter-clockwise " } | (N) -> rotate clockwise -" ] | (N) -> split vertically -" 0 | (N) -> create a vertical split 33% of the window -" ) | (N) -> create a vertical split 66% of the window -" [ | (N) -> split horizontally -" 9 | (N) -> create a horizontal split 33% of the window -" ( | (N) -> create a horizontal split 66% of the window " " (display) " | (N) -> reset window and clear search @@ -64,11 +62,8 @@ " ik | (N) -> add cursor character as a keyword " iK | (N) -> remove cursor character as a keyword " -" ~ | (N) -> pop-up a command reference -" | (N) -> toggle the vim reference manual -" ` | (A) -> toggle the gutter(numbers+folds+signify) -" -" | (N) -> toggle selected fold +" ` | (N) -> toggle the gutter +" ~ | (N) -> toggle folds " " | (A) -> toggle line wrapping " | (A) -> toggle spell check @@ -335,14 +330,13 @@ "} "SPLIT:{ + nmap ] ':vs' + nmap [ ':sp:wincmd j' + "} + + "ROTATE:{ nmap { ':wincmd R' nmap } ':wincmd r' - nmap ] ':vs' - nmap 0 ':VS33' - nmap ) ':VS66' - nmap [ ':sp:wincmd j' - nmap 9 ':SP33' - nmap ( ':SP66' "} "DISPLAY:{ @@ -365,14 +359,11 @@ nmap k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"' nmap K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"' - "toggle the command reference box - nnoremap ~ ':TCommand' - - "toggle the display of the left gutter + "toggle the gutter nnoremap ` ':if (&number)set nonumberif exists("b:sy")SignifyDisableendifelseset numberif exists("b:sy")SignifyEnableendifendif:echo "gutter visibility toggled"' - "toggle folded code at fold-points - nnoremap za + "toggle the fold sidebar + nnoremap ~ zRzi "toggle line wrapping (and bottom bar if using the gui) nnoremap ':set wrap!:echo "line wrapping toggled"' diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 28eba46..b929255 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -128,40 +128,6 @@ autocmd! autocmd BufFilePost * filetype detect augroup END - - "functions to create a split using 33% and 66% of the height - function s:SPResize33() - sp|wincmd =|q - endfunction - - function s:sp33() - sp|call s:SPResize33()|wincmd j - endfunction - - command! -buffer SP33 call s:sp33() - - function s:sp66() - sp|wincmd j|call s:SPResize33() - endfunction - - command! -buffer SP66 call s:sp66() - - "functions to create a vertical split using 33% and 66% width - function s:VSResize66() - vs|wincmd =|q - endfunction - - function s:vs66() - vs|call s:VSResize66() - endfunction - - command! -buffer VS66 call s:vs66() - - function s:vs33() - vs|wincmd h|call s:VSResize66()|wincmd l - endfunction - - command! -buffer VS33 call s:vs33() "}}} "}}} "}}}