]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
More sensible folding for python
authorMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 12 Sep 2019 12:50:40 +0000 (13:50 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 12 Sep 2019 12:50:40 +0000 (13:50 +0100)
states/vim/files/vimrc

index bae66ff1f8414f9d8016e6c61498aa700d317dc2..9a7f92bff1861c88600cf6b8cc2794b0652508ef 100644 (file)
@@ -119,6 +119,8 @@ let g:netrw_silent = 1
 
 " Set folding
 set foldmethod=syntax
+nnoremap <space> za
+vnoremap <space> zf
 
 " Better saving behaviour for go
 let g:go_fmt_experimental = 1
@@ -144,3 +146,6 @@ let g:python_highlight_string_format = 1
 let g:python_highlight_string_templates = 1
 let g:python_highlight_class_vars = 1
 let g:python_highlight_operators = 1
+
+" Python indent
+autocmd FileType python setlocal foldmethod=indent foldnestmax=2