aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
m---------vim/bundle/copy_linebreak0
m---------vim/bundle/make_target0
m---------vim/bundle/strip_trailing_whitespace0
-rw-r--r--vim/filemap.vim4
-rw-r--r--vim/vimrc34
5 files changed, 26 insertions, 12 deletions
diff --git a/vim/bundle/copy_linebreak b/vim/bundle/copy_linebreak
-Subproject f72e771130c47dedc2ec905b5b6a65ff224e97c
+Subproject f6fdbf1afaae48b16a11744ba3f9ea1d3922ebb
diff --git a/vim/bundle/make_target b/vim/bundle/make_target
new file mode 160000
+Subproject 186591c1201ffd4f204781a2989e0d7049786d4
diff --git a/vim/bundle/strip_trailing_whitespace b/vim/bundle/strip_trailing_whitespace
-Subproject fb3c25becd1e4a565c4339b000b96ff519544db
+Subproject f434572d4e99700d2dac5c5c0b78aac7601dd02
diff --git a/vim/filemap.vim b/vim/filemap.vim
index bbbf1955..d20a2037 100644
--- a/vim/filemap.vim
+++ b/vim/filemap.vim
@@ -25,6 +25,10 @@ augroup filetypemap
\|nmap <buffer> <LocalLeader>r <Plug>HtmlUrlLink
\|nmap <buffer> <LocalLeader>t <Plug>HtmlTidy
+ " Makefile: make target
+ autocmd FileType make
+ \ nmap <buffer> <LocalLeader>m <Plug>MakeTarget
+
" Perl: check, lint, and tidy
autocmd FileType perl
\ nmap <buffer> <LocalLeader>c <Plug>PerlCheck
diff --git a/vim/vimrc b/vim/vimrc
index 72106b0a..f48f31b6 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,8 +1,8 @@
" Tom Ryder (tejr)'s vimrc: <https://sanctum.geek.nz/cgit/dotfiles.git>
"
-" This file is not truly self-contained; it should run without errors on its
-" own without the accompanying plugins to which it refers near the end of this
-" file, but you'll get errors for some of the leader maps, for example.
+" This file is not truly self-contained. It should run without errors on its
+" own without the accompanying plugins to which it refers near its end, but
+" you'll get errors for some of the leader maps.
" Load filetype settings, plugins, and maps
if has('autocmd')
@@ -65,7 +65,9 @@ else
endif
" Don't wait for a key after Escape in insert mode
-set noesckeys
+if exists('+esckeys') " Not in Neovim
+ set noesckeys
+endif
" Delete comment leaders when joining lines, if supported
if v:version > 703 || v:version == 703 && has('patch541')
@@ -75,6 +77,11 @@ endif
" Don't join lines with two spaces at the end of sentences
set nojoinspaces
+" Don't show a statusline if there's only one window
+if has('nvim') " Neovim changed the default to 2
+ set laststatus=1
+endif
+
" Don't redraw the screen during batch execution
set lazyredraw
@@ -83,6 +90,9 @@ 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
+if v:version >= 700
+ set listchars+=nbsp:+ " Non-breaking spaces
+endif
" Add angle brackets to pairs of matched characters
set matchpairs+=<:>
@@ -215,13 +225,6 @@ nnoremap ZA :<C-U>wall!<CR>
" ZW unconditionally writes current buffer
nnoremap ZW :<C-U>write!<CR>
-" Custom digraphs
-if has('digraphs')
- digraph ./ 8230 " HORIZONTAL ELLIPSIS U+2026
- digraph %% 8984 " PLACE OF INTEREST SIGN U+2318 (Mac command key)
- digraph 8: 9731 " SNOWMAN U+2603
-endif
-
" Normal mode leader mappings below; use a literal backslash rather than
" <Leader> on the non-plugin maps so that they work on vim-tiny
@@ -273,11 +276,18 @@ nmap <Leader>x <Plug>StripTrailingWhitespace
" \z sets NZ English spelling (compare \u)
nnoremap \z :<C-U>setlocal spelllang=en_nz spelllang?<CR>
+" Custom digraphs
+if has('digraphs')
+ digraph ./ 8230 " HORIZONTAL ELLIPSIS U+2026
+ digraph %% 8984 " PLACE OF INTEREST SIGN U+2318 (Mac command key)
+ digraph 8: 9731 " SNOWMAN U+2603
+endif
+
" Settings for plugins
if &loadplugins
" Add packaged matchit.vim, if supported
- if has('packages')
+ if has('packages') && !has('nvim')
packadd! matchit
endif