Extract 'fold' config

master
Hektor Misplon 2023-12-18 13:47:46 +01:00
parent ad20848d86
commit 1b62acfc80
Signed by: hektor
GPG Key ID: 5151AF79E723F21C
2 changed files with 24 additions and 23 deletions

24
.vim/plugin/fold.vim Normal file
View File

@ -0,0 +1,24 @@
" Folds {{{
set foldmethod=marker
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
augroup filetype_python
autocmd!
autocmd FileType python setlocal foldmethod=indent
augroup END
augroup filetype_sh
autocmd!
autocmd FileType sh setlocal foldmethod=marker
augroup END
augroup filetype_snippets
autocmd!
autocmd FileType snippets setlocal foldmethod=marker
augroup END
" }}}

23
.vimrc
View File

@ -30,29 +30,6 @@ set spellsuggest+=5 " Limit spell suggestions
set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip
set thesaurus+=~/.vim/thesaurus/mthesaur.txt set thesaurus+=~/.vim/thesaurus/mthesaur.txt
" Folds {{{
" Insert date
fu! Today()
:put =strftime('%d %b %Y')
endfu
set foldmethod=marker
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
augroup filetype_python
autocmd!
autocmd FileType python setlocal foldmethod=indent
augroup END
augroup filetype_sh
autocmd!
autocmd FileType sh setlocal foldmethod=marker
augroup END
" }}} " }}}
" Mappings {{{ " Mappings {{{