diff --git a/README.md b/README.md index 8a9036f..233ad93 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ A theme, config and collection of plugins for Vim. | \<(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 | +| \<(Ctrl-or-Alt)-F12\> | ALL | Toggle the **goyo** distraction-free mode | #### Toggles #### diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index ac87671..852527f 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -29,7 +29,7 @@ " p | (A) -> comment the current paragraph " + | (V) -> increase the selected region " _ | (V) -> decrease the selected region -" | (N) -> center content and hide everything else +" | (N) -> center content and hide everything else " " (surround) " S" | (V) -> surround selection with quotes @@ -78,8 +78,10 @@ " ` | (A) -> toggle the gutter(line numbers, folds and signify) " " | (N) -> toggle selected fold +" | (N) -> open all folds " = | (N) -> open all folds " + | (N) -> open all folds +" | (N) -> open all folds " - | (N) -> unopen all folds " _ | (N) -> unopen all folds " 0 | (N) -> reset all folds using default fold level @@ -98,6 +100,9 @@ " | (A) -> toggle external-paste mode " | (A) -> toggle syntax checking " +" | (A) -> toggle goyo (distraction-free mode) +" | (A) -> toggle goyo (distraction-free mode) +" " (gvim toggles) " | (A) -> toggle the menubar " | (A) -> toggle the toolbar @@ -117,7 +122,7 @@ " | (I) -> (neocomp) undo the most recent completion " " (search) -" \ | (N) -> remove search highlighting +" / | (N) -> remove search highlighting " " (formatting) " | (V) -> deletes currently selected text @@ -213,7 +218,8 @@ " " Filetype Specific Mappings: " (extradite) -" | (A) -> close the dialog +" | (A) -> close the dialog +" | (A) -> close the dialog " | (A) -> same as down " l | (A) -> same as j " | (A) -> same as Up @@ -379,16 +385,18 @@ 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"' + nnoremap ` ':if (&number)set nonumberif (&foldenable)set nofoldenableendifif exists("b:sy")if (b:sy.active)SignifyToggleendifendifelseset numberif !(&foldenable)set foldenableendifif exists("b:sy")if !(b:sy.active)SignifyToggleendifendifendif:echo "gutter visibility toggled"' "toggle folded code at foldpoints nnoremap za "open all folds + nnoremap 'zn:echo "all folds have been opened"' nnoremap = 'zn:echo "all folds have been opened"' nnoremap + 'zn:echo "all folds have been opened"' "close folds set to be closed + nnoremap 'zN:echo "all opened folds have been closed"' nnoremap - 'zN:echo "all opened folds have been closed"' nnoremap _ 'zN:echo "all opened folds have been closed"' @@ -444,6 +452,10 @@ 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' + + "toggle goyo + nnoremap ':Goyo' + nnoremap ':Goyo' "} "GVIM TOGGLES:{ @@ -640,6 +652,7 @@ if !&diff autocmd FileType help map q ':q' autocmd FileType help map ':q' + autocmd FileType help map ? ':q' endif "markdown: launch table of contents instead of the tagbar diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 6a15802..eebae50 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -48,7 +48,6 @@ "}}} "GOYO: {{{ - nnoremap :Goyo autocmd VimEnter,Filetype * \ let g:goyo_width = &textwidth | \ if (g:goyo_width == 0) | @@ -123,10 +122,10 @@ "}}} "SIGNIFY: {{{ - let g:signify_sign_add = '+' - let g:signify_sign_change = '!' - let g:signify_sign_delete = '-' - let g:signify_sign_delete_first_line = '~' + let g:signify_sign_add='+' + let g:signify_sign_change='!' + let g:signify_sign_delete='-' + let g:signify_sign_delete_first_line='~' "}}} "SYNTASTIC: {{{ diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 240aa2d..b223eb0 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -51,7 +51,7 @@ set hlsearch incsearch ignorecase smartcase "configure search set diffopt=foldcolumn:0,filler "vimdiff default settings set formatoptions=roqnl12 "how automatic formatting is to be done - set foldmethod=syntax foldcolumn=1 foldlevel=3 "fold layers 3 or more deep + set foldmethod=syntax foldcolumn=1 foldlevel=5 "fold layers 5 or more deep let &showbreak="" "highlight wrapped lines when linewrap is enabled "enable tab completion in command mode and configure how it handles extensions