From 1b62acfc8059d1d946645d5eb4c90b41b6569228 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Mon, 18 Dec 2023 13:47:46 +0100 Subject: [PATCH] Extract 'fold' config --- .vim/plugin/fold.vim | 24 ++++++++++++++++++++++++ .vimrc | 23 ----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 .vim/plugin/fold.vim diff --git a/.vim/plugin/fold.vim b/.vim/plugin/fold.vim new file mode 100644 index 0000000..15092b5 --- /dev/null +++ b/.vim/plugin/fold.vim @@ -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 + +" }}} diff --git a/.vimrc b/.vimrc index 0c44ed4..9173624 100644 --- a/.vimrc +++ b/.vimrc @@ -30,29 +30,6 @@ set spellsuggest+=5 " Limit spell suggestions set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip 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 {{{