From aef8c0a12d6c1796221c230a65bf948011672cec Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Sun, 20 Jul 2014 21:17:26 -0400 Subject: [PATCH] Swapped ctrl/alt-F# keys with F# keys (toggles are used more) --- README.md | 16 +++--- vim/config/keyboard.vim | 111 ++++++++++++++++++++++------------------ 2 files changed, 68 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index cd08822..8a9036f 100644 --- a/README.md +++ b/README.md @@ -88,19 +88,19 @@ A theme, config and collection of plugins for Vim. | Binding | Mode | Action | |:-----------------------|:----:|-------------------------------------------------:| -| \ | ALL | Toggle **vimfiler** file manager sidebar | -| \ | ALL | Toggle the **gundo** undo history sidebar | -| \ | ALL | Toggle the **tagbar** source code tag sidebar | -| \ | ALL | Toggle the **extradite** git history window | +| \<(Ctrl-or-Alt)-F1\> | ALL | Toggle **vimfiler** file manager sidebar | +| \<(Ctrl-or-Alt)-F2\> | ALL | Toggle the **gundo** undo history sidebar | +| \<(Ctrl-or-Alt)-F3\> | ALL | Toggle the **tagbar** source code tag sidebar | +| \<(Ctrl-or-Alt)-F4\> | ALL | Toggle the **extradite** git history window | #### Toggles #### | Binding | Mode | Action | |:-----------------------|:----:|-------------------------------------------------:| -| \<(Ctrl-or-Alt)-F1\> | ALL | Toggle line wrapping | -| \<(Ctrl-or-Alt)-F2\> | ALL | Toggle highlighting of spelling mistakes | -| \<(Ctrl-or-Alt)-F3\> | ALL | Toggle source code syntax checking | -| \<(Ctrl-or-Alt)-F4\> | ALL | Toggle external-paste mode | +| \ | ALL | Toggle line wrapping | +| \ | ALL | Toggle highlighting of spelling mistakes | +| \ | ALL | Toggle source code syntax checking | +| \ | ALL | Toggle external-paste mode | | | | | | \` | NORM | Toggle gutter (left bar with line numbers etc.) | | \\ | NORM | Toggle the **vim** reference manual | diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index e114211..2a0a9a0 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -74,6 +74,7 @@ " " (toggles and features) " | (N) -> toggle the vim reference manual +" ? | (N) -> toggle the vim reference manual " ` | (A) -> toggle the gutter(line numbers, folds and signify) " " Space | (N) -> toggle selected fold @@ -81,19 +82,19 @@ " - | (N) -> unopen all folds " 0 | (N) -> reset all folds using default fold level " -" | (A) -> toggle vimfiler sidebar -" | (A) -> toggle the gundo sidebar -" | (A) -> toggle the tagbar sidebar -" | (A) -> toggle extradite git commit history +" | (A) -> toggle vimfiler sidebar +" | (A) -> toggle the gundo sidebar +" | (A) -> toggle the tagbar sidebar +" | (A) -> toggle extradite git commit history +" | (A) -> toggle vimfiler sidebar +" | (A) -> toggle the gundo sidebar +" | (A) -> toggle the tagbar sidebar +" | (A) -> toggle extradite git commit history " -" | (A) -> toggle line wrapping -" | (A) -> toggle spell check -" | (A) -> toggle syntax checking -" | (A) -> toggle external-paste mode -" | (A) -> toggle line wrapping -" | (A) -> toggle spell check -" | (A) -> toggle syntax checking -" | (A) -> toggle external-paste mode +" | (A) -> toggle line wrapping +" | (A) -> toggle spell check +" | (A) -> toggle external-paste mode +" | (A) -> toggle syntax checking " " (gvim toggles) " | (A) -> toggle the menubar @@ -373,6 +374,7 @@ "TOGGLES AND FEATURES:{ "toggle the vim reference manual nnoremap ':h index.txt' + nnoremap ? ':h index.txt' "toggle the display of the left gutter nnoremap ` ':if (&number)set number!if (&foldenable)set foldenable!endifif exists("b:sy")if (b:sy.active)SignifyToggleendifendifelseset number!if !(&foldenable)set foldenable!endifif exists("b:sy")if !(b:sy.active)SignifyToggleendifendifendif:echo "gutter visibility toggled"' @@ -390,52 +392,54 @@ nnoremap 0 'zX:echo "all folds have been reset"' "trigger vimfiler - nnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' - xnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' - inoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + nnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + xnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + inoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + nnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + xnoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' + inoremap ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45' "bindings to trigger the gundo undo history - nnoremap ':GundoToggle:echo "undo history sidebar toggled"' - xnoremap ':GundoToggle' - inoremap ':GundoToggle' + nnoremap ':GundoToggle:echo "undo history sidebar toggled"' + xnoremap ':GundoToggle' + inoremap ':GundoToggle' + nnoremap ':GundoToggle:echo "undo history sidebar toggled"' + xnoremap ':GundoToggle' + inoremap ':GundoToggle' "bindings to trigger the tagbar list of tags - nnoremap ':TagbarToggle:echo "tagbar toggled"' - xnoremap ':TagbarTogglegv' - inoremap ':TagbarToggle' + nnoremap ':TagbarToggle:echo "tagbar toggled"' + xnoremap ':TagbarTogglegv' + inoremap ':TagbarToggle' + nnoremap ':TagbarToggle:echo "tagbar toggled"' + xnoremap ':TagbarTogglegv' + inoremap ':TagbarToggle' "view commit history and diffs - nnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' - xnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' - inoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + nnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + xnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + inoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + nnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + xnoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' + inoremap ':Extradite!:resize 10:wincmd x:wincmd b:wincmd H:wincmd b' "toggle line wrapping (and bottom bar if using the gui) - nnoremap ':set wrap!:echo "line wrapping toggled"' - xnoremap ':set wrap!gv' - inoremap ':set wrap!' - nnoremap ':set wrap!:echo "line wrapping toggled"' - xnoremap ':set wrap!gv' - inoremap ':set wrap!' + nnoremap ':set wrap!:echo "line wrapping toggled"' + xnoremap ':set wrap!gv' + inoremap ':set wrap!' "toggle spellcheck - nnoremap ':set spell!:echo "spell checking toggled"' - xnoremap ':set spell!gv' - inoremap ':set spell!' - nnoremap ':set spell!:echo "spell checking toggled"' - xnoremap ':set spell!gv' - inoremap ':set spell!' - - "toggle syntax checking - nnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' - xnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleModegv' - inoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' - nnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' - xnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleModegv' - inoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' + nnoremap ':set spell!:echo "spell checking toggled"' + xnoremap ':set spell!gv' + inoremap ':set spell!' "toggle external-paste mode - set pastetoggle= - noremap + set pastetoggle= + + "toggle syntax checking + nnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' + xnoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleModegv' + inoremap ':if (g:syntastic_check_on_open == 1)let g:syntastic_check_on_open=0let g:syntastic_check_on_wq=0elselet g:syntastic_check_on_open=1let g:syntastic_check_on_wq=1endif:SyntasticToggleMode' "} "GVIM TOGGLES:{ @@ -616,7 +620,8 @@ autocmd FileType extradite map l j autocmd FileType extradite map autocmd FileType extradite map h k - autocmd FileType extradite map q + autocmd FileType extradite map q + autocmd FileType extradite map q "gundo autocmd FileType gundo map 0l @@ -634,7 +639,8 @@ endif "markdown: launch table of contents instead of the tagbar - autocmd FileType mkd map ':Toch' + autocmd FileType mkd map ':Toch' + autocmd FileType mkd map ':Toch' "markdown table of contents autocmd FileType qf map 0 @@ -670,10 +676,13 @@ "DISABLED MAPPINGS FOR FILETYPES: {{{ "remove incompatible toggles from specific file types autocmd Filetype qf,gundo,vimfiler,tagbar,extradite,help noremap ` - autocmd Filetype qf,vimfiler,extradite,help noremap - autocmd Filetype qf,gundo,vimfiler,extradite,help noremap + autocmd Filetype qf,vimfiler,extradite,help noremap + autocmd Filetype qf,vimfiler,extradite,help noremap + autocmd Filetype qf,gundo,vimfiler,extradite,help noremap + autocmd Filetype qf,gundo,vimfiler,extradite,help noremap autocmd Filetype ggundo,vimfiler,extradite,tagbar,help noremap ? - autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap + autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap + autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap "disable modifier keys with directions that would interfere with logic autocmd Filetype qf,gundo,vimfiler noremap