aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-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
m---------vim/bundle/markdown_autoformat0
-rw-r--r--vim/plugin/dist.vim2
-rw-r--r--vim/vimrc16
8 files changed, 38 insertions, 16 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>
diff --git a/vim/bundle/markdown_autoformat b/vim/bundle/markdown_autoformat
deleted file mode 160000
-Subproject dc5d96400412f63a170e87bc7e947743df07b76
diff --git a/vim/plugin/dist.vim b/vim/plugin/dist.vim
index 53962c93..ac3671a2 100644
--- a/vim/plugin/dist.vim
+++ b/vim/plugin/dist.vim
@@ -8,8 +8,6 @@ let g:loaded_tarPlugin = 1
let g:loaded_zipPlugin = 1
" I prefer filtering text with Unix tools
let g:loaded_logiPat = 1
-" The shell, tab completion, and 'wildmenu' are good enough
-let g:loaded_netrwPlugin = 1
" I don't use Vim servers
let g:loaded_rrhelper = 1
" I don't need extra spelling files
diff --git a/vim/vimrc b/vim/vimrc
index 6b181fa7..e9fbaf3f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -49,8 +49,8 @@ set backup
set backupdir^=~/.vim/cache/backup,~/vimfiles/cache/backup
" Add some paths not to back up
-set backupskip+=/dev/shm/*
-set backupskip+=/var/tmp/*
+set backupskip^=/dev/shm/*
+set backupskip^=/var/tmp/*
" Indent wrapped lines
silent! set breakindent
@@ -113,11 +113,11 @@ set lazyredraw
set linebreak
" Define extra 'list' display characters
-set listchars+=extends:> " Unwrapped text to screen right
-set listchars+=precedes:< " Unwrapped text to screen left
-set listchars+=tab:>- " Tab characters, preserve width
-set listchars+=trail:_ " Trailing spaces
-silent! set listchars+=nbsp:+ " Non-breaking spaces
+set listchars^=extends:> " Unwrapped text to screen right
+set listchars^=precedes:< " Unwrapped text to screen left
+set listchars^=tab:>- " Tab characters, preserve width
+set listchars^=trail:_ " Trailing spaces
+silent! set listchars^=nbsp:+ " Non-breaking spaces
" Don't allow setting options via buffer content
set nomodeline
@@ -127,7 +127,7 @@ set nrformats-=octal
" Options for file search with gf/:find
set path-=/usr/include " Let the C/C++ filetypes set that
-set path+=** " Search current directory's whole tree
+set path^=** " Search current directory's whole tree
" Don't show startup splash screen (I donated)
set shortmess+=I