mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-12-28 10:14:33 -05:00
Disable the fold column by default, and toggle the column with fold functionality
This commit is contained in:
parent
b78b285fb1
commit
1810246da2
2 changed files with 13 additions and 2 deletions
|
@ -363,7 +363,18 @@
|
|||
nnoremap <silent><expr> ` ':if (&number)<Bar>set nonumber<Bar>if exists("b:sy")<Bar>SignifyDisable<Bar>endif<Bar>else<Bar>set number<Bar>if exists("b:sy")<Bar>SignifyEnable<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>'
|
||||
|
||||
"toggle the fold sidebar
|
||||
nnoremap ~ zRzi
|
||||
function! FoldToggle()
|
||||
if (&foldcolumn == 0)
|
||||
set foldenable
|
||||
set foldcolumn=1
|
||||
normal zR
|
||||
else
|
||||
set nofoldenable
|
||||
set foldcolumn=0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
nnoremap <silent><expr> ~ ':call FoldToggle()<CR>'
|
||||
|
||||
"toggle line wrapping (and bottom bar if using the gui)
|
||||
nnoremap <silent><expr> <F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
syntax on "enable syntax highlighting
|
||||
set formatoptions=roqnl12 "how automatic formatting is to be done
|
||||
set diffopt=foldcolumn:0,filler "vimdiff default settings
|
||||
set foldmethod=indent foldcolumn=1 foldlevel=2 "fold layers 3 and deeper
|
||||
set foldmethod=indent foldcolumn=0 "use intentation as the fold method and disable the fold column
|
||||
set nofoldenable "disable folds by default
|
||||
set tw=80 "set the default text width to 80 when nothing overrides this
|
||||
set maxmempattern=10000 "increase the maximum amount of memory available for pattern matching
|
||||
|
|
Loading…
Reference in a new issue