aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-07 15:35:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-07 15:35:50 +1200
commite58e1999a351f7ce4116b13daac12bea1346cf06 (patch)
treed7c89ca2adc80ad7d7415f446dcf07f2443d1913 /vim/vimrc
parentMerge branch 'release/v1.22.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-1.23.0.tar.gz (sig)
dotfiles-1.23.0.zip
Merge branch 'release/v1.23.0'v1.23.0
* release/v1.23.0: Bump VERSION Include up to 500 commit messages in merge log Rearrange Makefile for Neovim install Require semicolon on same line of heredoc Inline ternary condition in Perl Vim indent More speed refactoring for Perl Vim indent Rearrange heredoc/POD indent check for speed Refine Perl line cont hints in Vim indent Simplify Vim Perl shiftwidth calculation Simplify POD Vim indenting behaviour Add POD rules to Vim Perl indent Pass Vim indent line into Perl function Further extension of Perl Vim line cont rules Remove misplaced separator in b:undo_indent Revert "Remove Vim Perl indent" Remove Vim Perl indent Committing final state of Vim Perl indent Correct end of heredoc pattern in Vim Perl indent Adjust continued line indent for Vim Perl Add heredoc support to Vim Perl indent plugin Refactor rules in Vim Perl indent script Remove unneeded parens in Vim Perl indent script Rearrange settings in Vim Perl indent script Adjust a few Vim Perl indent comments Wrap comments with `gq` in Git commit messages Get 'shiftwidth' in Vim Perl indent portably Adjust leading comment for Vim Perl indent Refactor opening of Vim Perl indent script Add a comment to Vim Perl indent rules Add attempt at own Vim Perl indenting Correct has() to exists() in .vimrc Remove .vimrc 'report' setting Rearrange Vim's VimL indent file Add \k, \q, and \y .vimrc mappings Disable 'shiftround' in Vim for a while Add shebang_update.vim plugin Future-proof README.md discussion of Vim plugins Correct 'softtabstop' test in indent/vim.vim
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc12
1 files changed, 7 insertions, 5 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 4b2803fe..300fc3a5 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -14,7 +14,7 @@ if has('autocmd')
endif
" Options dependent on the syntax feature
-if has('syntax') && !has('g:syntax_on')
+if has('syntax') && !exists('g:syntax_on')
" Use syntax highlighting
syntax enable
@@ -34,7 +34,6 @@ endif
" The all-important default indent settings; filetypes to tweak
set autoindent " Use indent of previous line on new lines
set expandtab " Use spaces instead of tabs
-set shiftround " Round indenting to multiples of 'shiftwidth'
set shiftwidth=4 " Indent with four spaces
" Spaces to insert on Tab key insert
@@ -105,9 +104,6 @@ set nomodeline
" Treat numbers with a leading zero as decimal, not octal
set nrformats-=octal
-" Always tell me the number of lines changed by a command
-set report=0
-
" Abbreviate some more regularly displayed messages
set shortmess+=I " Don't show startup splash screen
set shortmess+=m " [Modified] -> [+]
@@ -239,6 +235,8 @@ nnoremap <Bslash>h :<C-U>set hlsearch! hlsearch?<CR>
nnoremap <Bslash>i :<C-U>set incsearch! incsearch?<CR>
" \j jumps to buffers (jetpack)
nnoremap <Bslash>j :<C-U>buffers<CR>:buffer<Space>
+" \k shows my marks
+nnoremap <Bslash>k :<C-U>marks<CR>
" \l toggles showing tab, end-of-line, and trailing whitespace
nnoremap <Bslash>l :<C-U>set list! list?<CR>
" \m shows all maps
@@ -253,6 +251,8 @@ nmap <Bslash>o <Plug>PasteOpenBelow
nmap <Bslash>O <Plug>PasteOpenAbove
" \p toggles paste mode
nnoremap <Bslash>p :<C-U>set paste! paste?<CR>
+" \q formats the current paragraph
+nnoremap <Bslash>q gqap
" \r reloads .vimrc
nnoremap <Bslash>r :<C-U>source $MYVIMRC<CR>
" \s toggles spell checking
@@ -269,6 +269,8 @@ nnoremap <Bslash>V :<C-U>let b: t: w:<CR>
nnoremap <Bslash>w :<C-U>set wrap! wrap?<CR>
" \x strips trailing whitespace via a custom plugin
nmap <Bslash>x <Plug>StripTrailingWhitespace
+" \y shows all registers
+nnoremap <Bslash>y :<C-U>registers<CR>
" \z sets NZ English spelling (compare \u)
nnoremap <Bslash>z :<C-U>setlocal spelllang=en_nz<CR>