aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:24:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:24:01 +1200
commit352e2b820167ff2377350683a88a69af803be78c (patch)
treedd579c6f2170b8dcb5191101c69f97e0d6e12206 /vim/after
parentb5862a03d07d378d62899acbe0ab31a785caac6e (diff)
downloaddotfiles-352e2b820167ff2377350683a88a69af803be78c.tar.gz
dotfiles-352e2b820167ff2377350683a88a69af803be78c.zip
Move 'foldmethod' definitions out to filetypes
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/c.vim4
-rw-r--r--vim/after/ftplugin/perl.vim4
-rw-r--r--vim/after/ftplugin/php.vim4
-rw-r--r--vim/after/ftplugin/sh.vim4
-rw-r--r--vim/after/ftplugin/vim.vim4
-rw-r--r--vim/after/ftplugin/zsh.vim4
6 files changed, 24 insertions, 0 deletions
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim
index dd99e81f..ea220e65 100644
--- a/vim/after/ftplugin/c.vim
+++ b/vim/after/ftplugin/c.vim
@@ -6,6 +6,10 @@ let b:undo_ftplugin .= '|setlocal commentstring< define< include<'
setlocal complete+=d
let b:undo_ftplugin .= '|setlocal complete<'
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'
+
" Include system headers on UNIX
if has('unix')
setlocal path+=/usr/include
diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim
index a303fa75..e780bed5 100644
--- a/vim/after/ftplugin/perl.vim
+++ b/vim/after/ftplugin/perl.vim
@@ -4,6 +4,10 @@ setlocal equalprg=perltidy
let b:undo_ftplugin .= '|unlet b:current_compiler'
\ . '|setlocal equalprg< errorformat< makeprg<'
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'
+
" Add angle brackets to pairs of matched characters for q<...>
setlocal matchpairs+=<:>
let b:undo_ftplugin .= '|setlocal matchpairs<'
diff --git a/vim/after/ftplugin/php.vim b/vim/after/ftplugin/php.vim
index 58d83c49..7bb20f99 100644
--- a/vim/after/ftplugin/php.vim
+++ b/vim/after/ftplugin/php.vim
@@ -8,6 +8,10 @@ setlocal comments=s1:/*,m:*,ex:*/,://,:#
setlocal formatoptions+=or
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'
+
" Use pman as 'keywordprg'
setlocal keywordprg=pman
let b:undo_ftplugin .= '|setlocal keywordprg<'
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index 8468b133..2c68d83a 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -3,6 +3,10 @@ setlocal comments=:#
setlocal formatoptions+=or
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'
+
" If subtype is Bash, set 'keywordprg' to han(1df)
if exists('b:is_bash')
setlocal keywordprg=han
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 30182bba..01f971b9 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -9,6 +9,10 @@ endif
let b:regex_escape_flavor = 'vim'
let b:undo_ftplugin .= '|unlet b:regex_escape_flavor'
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'
+
" Use :help as 'keywordprg' if not already set; this is the default since Vim
" v8.1.1290
if &keywordprg !=# ':help'
diff --git a/vim/after/ftplugin/zsh.vim b/vim/after/ftplugin/zsh.vim
index 5aa2600a..6b5a389c 100644
--- a/vim/after/ftplugin/zsh.vim
+++ b/vim/after/ftplugin/zsh.vim
@@ -2,3 +2,7 @@
compiler zsh
let b:undo_ftplugin .= '|unlet b:current_compiler'
\ . '|setlocal errorformat< makeprg<'
+
+" Fold based on indent level
+setlocal foldmethod=indent
+let b:undo_ftplugin .= '|setlocal foldmethod<'