aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/mail.vim23
-rw-r--r--vim/after/ftplugin/perl.vim2
-rw-r--r--vim/after/ftplugin/php.vim4
-rw-r--r--vim/after/plugin/dist.vim1
-rw-r--r--vim/after/plugin/surround.vim6
5 files changed, 30 insertions, 6 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 34c524e1..2917425d 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -3,11 +3,26 @@ if &filetype !=# 'mail' || &compatible || v:version < 700
finish
endif
-" We will almost always want to start editing after the headers, so move to
-" the first entirely blank line, if something hasn't already moved us from the
-" start of the file
+" If something hasn't already moved the cursor, we'll move to an optimal point
+" to start writing
if line('.') == 1 && col('.') == 1
- call search('\m^$', 'c')
+
+ " Start by trying to move to the first quoted line; this may fail if there's
+ " no quote, which is fine
+ call search('\m^>', 'c')
+
+ " Check this line to see if it's a generic hello-name greeting that we can
+ " just strip out; delete the following line too, if it's blank
+ if getline('.') =~? '^>\s*\%(<hello\|hi\)\s\+\S\+\s*$'
+ delete
+ if getline('.') =~# '^>$'
+ delete
+ endif
+ endif
+
+ " Now move to the first quoted or unquoted blank line
+ call search('\m^>\=$', 'c')
+
endif
" Add a space to the end of wrapped lines for format-flowed mail
diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim
index 777c3ad4..9c3ce6f6 100644
--- a/vim/after/ftplugin/perl.vim
+++ b/vim/after/ftplugin/perl.vim
@@ -1,5 +1,5 @@
" Extra configuration for Perl filetypes
-if &filetype !=# 'perl' || v:version < 700 || &compatible
+if &filetype !=# 'perl' || v:version < 700 || &compatible
finish
endif
diff --git a/vim/after/ftplugin/php.vim b/vim/after/ftplugin/php.vim
index c98c1264..9b7c2bb0 100644
--- a/vim/after/ftplugin/php.vim
+++ b/vim/after/ftplugin/php.vim
@@ -13,6 +13,10 @@ setlocal comments=s1:/*,m:*,ex:*/,://,:#
setlocal formatoptions+=or
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
+" Use pman as 'keywordprg'
+setlocal keywordprg=pman
+let b:undo_ftplugin .= '|setlocal keywordprg<'
+
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_php_maps')
finish
diff --git a/vim/after/plugin/dist.vim b/vim/after/plugin/dist.vim
index 4613925f..bc8995b6 100644
--- a/vim/after/plugin/dist.vim
+++ b/vim/after/plugin/dist.vim
@@ -2,7 +2,6 @@
unlet! g:loaded_getscriptPlugin
unlet! g:loaded_vimballPlugin
unlet! g:loaded_logiPat
-unlet! g:loaded_netrwPlugin
unlet! g:loaded_rrhelper
unlet! g:loaded_spellfile_plugin
unlet! g:loaded_gzip
diff --git a/vim/after/plugin/surround.vim b/vim/after/plugin/surround.vim
new file mode 100644
index 00000000..b1face5f
--- /dev/null
+++ b/vim/after/plugin/surround.vim
@@ -0,0 +1,6 @@
+" Remove surround.vim's insert mode maps
+iunmap <Plug>ISurround
+iunmap <Plug>Isurround
+iunmap <C-G>S
+iunmap <C-G>s
+iunmap <C-S>