aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-06 20:42:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-06 20:42:43 +1200
commit16e641a7641c0c4ef61bfbdbbe3a513c305b0356 (patch)
tree330974c7766f0a1b87660153b6dfb057dbba18d6 /vim/vimrc
parentMerge branch 'hotfix/v0.48.2' (diff)
parentBump VERSION (diff)
downloaddotfiles-16e641a7641c0c4ef61bfbdbbe3a513c305b0356.tar.gz
dotfiles-16e641a7641c0c4ef61bfbdbbe3a513c305b0356.zip
Merge branch 'release/v0.49.0'v0.49.0
* release/v0.49.0: Bump VERSION Remove vestigial comment from .vimrc Remove duplicate 'encoding' setting Remove 'backupskip' setting Inline some option flag comments Add a little more syntax context Move syntax block up Check for 'formatlistpat' option existence Correct ksh pattern
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc94
1 files changed, 34 insertions, 60 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 2c0047d7..723e69da 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -4,12 +4,6 @@
" 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.
-" If we're in compatible mode, ensure that the 'C' option that disallows line
-" continuations is stripped out, as they're heavily used in this configuration
-" for readability; we'll put it back later. Yes, this is necessary, for
-" example if this file is :sourced while &compatible, or if Vim is invoked
-" under its other name--we are out there, we ex(1)ist!
-
" Use UTF-8 by default wherever possible
if has('multi_byte')
set encoding=utf-8
@@ -27,14 +21,29 @@ if has('autocmd')
filetype plugin indent on
endif
+" Options dependent on the syntax feature
+if has('syntax') && !has('g:syntax_on')
+
+ " Use syntax highlighting with 150 lines of context
+ silent! syntax enable
+ silent! syntax sync minlines=150
+
+ " Opinionated; if the author is using color at all, it will probably be with
+ " a dark background
+ set background=dark
+
+ " The 'sahara' colorscheme only works in the GUI or with 256 colors
+ if has('gui_running') || &t_Co >= 256
+ silent! colorscheme sahara
+ endif
+
+endif
+
" Let me backspace over pretty much anything
set backspace=
-" Allow backspacing over autoindent
-set backspace+=indent
-" Allow backspacing over line breaks
-set backspace+=eol
-" Allow backspacing over the start of the insert operation
-set backspace+=start
+set backspace+=indent " Spaces from 'audoindent'
+set backspace+=eol " Line breaks
+set backspace+=start " The start of current insertion
" Default to no backup files at all, in a way that even ancient/tiny Vims will
" understand; the auto_cache_dirs.vim plugin will take care of re-enabling
@@ -45,10 +54,6 @@ set nowritebackup
" If backups are enabled, use a more explicit and familiar backup suffix
set backupext=.bak
-" Don't back up files in anything named */shm/; they might be password
-" files
-set backupskip+=*/shm/*
-
" Allow jumping between windows and tabs to find an open instance of a given
" buffer with :sbuffer.
set switchbuf=useopen
@@ -123,32 +128,19 @@ endif
" Set up short message settings
set shortmess=
-" (file 3 of 5) -> (3 of 5)
-set shortmess+=f
-" [Incomplete last line] -> [eol]
-set shortmess+=i
-" I donated to Uganda, thanks Bram
-set shortmess+=I
-" 999 lines, 888 characters -> 999L, 888C
-set shortmess+=l
-" [Modified] -> [+]
-set shortmess+=m
-" [New File] -> [New]
-set shortmess+=n
-" Don't stack file writing messages
-set shortmess+=o
-" Don't stack file reading messages
-set shortmess+=O
-" [readonly] -> [RO]
-set shortmess+=r
-" Truncate file message at start if too long
-set shortmess+=t
-" Truncate other message in midle if too long
-set shortmess+=T
-" written -> [w], appended -> [a]
-set shortmess+=w
-" [dos format] -> [dos]
-set shortmess+=x
+set shortmess+=f " (file 3 of 5) -> (3 of 5)
+set shortmess+=i " [Incomplete last line] -> [eol]
+set shortmess+=I " I donated to Uganda, thanks Bram
+set shortmess+=l " 999 lines, 888 characters -> 999L, 888C
+set shortmess+=m " [Modified] -> [+]
+set shortmess+=n " [New File] -> [New]
+set shortmess+=o " Don't stack file writing messages
+set shortmess+=O " Don't stack file reading messages
+set shortmess+=r " [readonly] -> [RO]
+set shortmess+=t " Truncate file message at start if too long
+set shortmess+=T " Truncate other message in midle if too long
+set shortmess+=w " written -> [w], appended -> [a]
+set shortmess+=x " [dos format] -> [dos]
" Don't show whitespace characters or end-of-line characters visually by
" default, but make \l toggle between them
@@ -260,24 +252,6 @@ vnoremap <silent> & :<C-U>&&<CR>
" this with a 'directory' setting
set noswapfile
-" Options dependent on the syntax feature
-if has('syntax') && !has('g:syntax_on')
-
- " Use syntax highlighting with 100 lines of context
- silent! syntax enable
- silent! syntax sync minlines=100
-
- " Opinionated; if the author is using color at all, it will probably be with
- " a dark background
- set background=dark
-
- " The 'sahara' colorscheme only works in the GUI or with 256 colors
- if has('gui_running') || &t_Co >= 256
- silent! colorscheme sahara
- endif
-
-endif
-
" Start paste mode with F10 to prevent console Vim from confusing a swathe of
" pre-formatted pasted text with actual keyboard input, and thereby attempting
" to indent it inappropriately. If unimpaired.vim is available, it's generally