Update fold config

master
Hektor Misplon 2023-04-07 22:45:42 +02:00
parent 6b236fee98
commit 3b6f5d1315
1 changed files with 17 additions and 0 deletions

17
.vimrc
View File

@ -41,21 +41,38 @@ let g:netrw_banner = 0
fu! ToggleConceal() fu! ToggleConceal()
if (&cole == 0) | se cole =2 | else | set cole =0 | endif if (&cole == 0) | se cole =2 | else | set cole =0 | endif
endfu endfu
" Folds {{{
" Insert date " Insert date
fu! Today() fu! Today()
:put =strftime('%d %b %Y') :put =strftime('%d %b %Y')
endfu endfu
set foldmethod=marker
" Add command line functions names " Add command line functions names
com! -nargs=0 Today :call Today() com! -nargs=0 Today :call Today()
com! -nargs=0 ToggleLineNumbers :call ToggleLineNumbers() com! -nargs=0 ToggleLineNumbers :call ToggleLineNumbers()
com! -nargs=0 ToggleConceal :call ToggleConceal() com! -nargs=0 ToggleConceal :call ToggleConceal()
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
" Setup Man command for reading man pages " Setup Man command for reading man pages
if exists(":Man") != 2 if exists(":Man") != 2
source $VIMRUNTIME/ftplugin/man.vim source $VIMRUNTIME/ftplugin/man.vim
endif endif
augroup filetype_python
autocmd!
autocmd FileType python setlocal foldmethod=indent
augroup END
augroup filetype_sh
autocmd!
autocmd FileType sh setlocal foldmethod=marker
augroup END
" }}}
" Keybindings " Keybindings
""""""""""""" """""""""""""