From 9ec50961684295721383fca50bf70aa0ec7a5ba6 Mon Sep 17 00:00:00 2001 From: Alexander Karle Date: Tue, 6 Mar 2018 12:54:19 -0500 Subject: [PATCH] Some vim folding preferences --- vim/ftplugin/python.vim | 7 +++++++ vim/plugins.vim | 2 +- vim/vimrc | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 vim/ftplugin/python.vim diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim new file mode 100644 index 0000000..8dc0499 --- /dev/null +++ b/vim/ftplugin/python.vim @@ -0,0 +1,7 @@ +" set fold method to be indent based +" USAGE: +" KEY: no longer use zf#j or zf/ to create folds +" instead: +" zc -- close a fold by indent (at cursor until end indent) +" zo -- open a closed fold +set foldmethod=indent diff --git a/vim/plugins.vim b/vim/plugins.vim index 62efda8..7cfc792 100644 --- a/vim/plugins.vim +++ b/vim/plugins.vim @@ -24,7 +24,7 @@ Plug 'airblade/vim-gitgutter' Plug 'vim-syntastic/syntastic', { 'for': 'python' } " todo task plugin -" Plug 'irrationalistic/vim-tasks' +Plug 'irrationalistic/vim-tasks' " Simple latex tools Plug 'lervag/vimtex', { 'for': 'tex' } diff --git a/vim/vimrc b/vim/vimrc index 9f9f05b..49e4558 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -38,6 +38,9 @@ set encoding=utf-8 " Show whitespace with 'set: list' (disable: set: nolist) set listchars=space:·,tab:>–,trail:~,eol:¬ +" Prevent {}, (), [] commands from opening folds +set foldopen-=block + " Source helper files " Only load plugins if vim-plug installed! if filereadable(expand("~/.vim/autoload/plug.vim")) -- libgit2 0.28.4