aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-14 11:52:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-14 11:52:55 +1200
commite18bf97f3f709a7213f94f9f161f45f0c3f6ccfc (patch)
tree660a80202560645b9c4c6b0a8e9b21365eda74f7
parent52fdc88c7af4c12259a1632e124503f491061252 (diff)
parent08e0e4217061f7abd29dab1af14a906a1834e15e (diff)
downloaddotfiles-e18bf97f3f709a7213f94f9f161f45f0c3f6ccfc.tar.gz
dotfiles-e18bf97f3f709a7213f94f9f161f45f0c3f6ccfc.zip
Merge branch 'release/v4.27.0'v4.27.0
* release/v4.27.0: Bump VERSION Remove some overzealous conditions from vimrc Simplify colorscheme comments Remove redundant :pwd from mapping
-rw-r--r--VERSION4
-rw-r--r--vim/vimrc74
2 files changed, 29 insertions, 49 deletions
diff --git a/VERSION b/VERSION
index 6350b561..a208ef25 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v4.26.0
-Sun May 12 12:14:12 UTC 2019
+tejr dotfiles v4.27.0
+Mon May 13 23:52:55 UTC 2019
diff --git a/vim/vimrc b/vim/vimrc
index 48ebca1d..dbdda4e3 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -14,37 +14,23 @@ if !exists('$MYVIMRUNTIME')
endif
" Load filetype settings, plugins, and maps
-if has('autocmd')
- let maplocalleader = ','
- filetype plugin indent on
-endif
-
-" Options dependent on the syntax feature
-if has('syntax')
-
- " Use syntax highlighting
- if !exists('syntax_on')
- syntax enable
- endif
-
- " Colorscheme handling
- try
-
- " Use sahara.vim colorscheme, if using gVim or a 256-color term
- colorscheme sahara
-
- " Use the colorscheme's subtle 'cursorline', if it loaded
- if exists('+cursorline')
- set cursorline
- endif
-
- " Otherwise, use the default colorscheme with a dark background
- catch
- set background=dark
- endtry
+let maplocalleader = ','
+filetype plugin indent on
+" Use syntax highlighting
+if !exists('syntax_on')
+ syntax enable
endif
+" Try to use sahara colorscheme with 'cursorline' set; otherwise, use the
+" default colorscheme with a dark background
+try
+ colorscheme sahara
+ set cursorline
+catch
+ set background=dark
+endtry
+
" 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
@@ -66,7 +52,7 @@ else
set backupdir^=$MYVIMRUNTIME/cache/backup
endif
-" Add some paths not to back up
+" Add some *nix paths not to back up
if has('unix')
set backupskip^=/dev/shm/* " Shared memory RAM disk
set backupskip^=/usr/tmp/* " Hardcoded path for `sudo -e`
@@ -83,10 +69,8 @@ set comments=
set commentstring=
" Add completion options
-if exists('+completeopt')
- set completeopt+=longest " Insert longest common substring
- set completeopt+=menuone " Show the menu even if only one match
-endif
+set completeopt+=longest " Insert longest common substring
+set completeopt+=menuone " Show the menu even if only one match
" Give me a prompt instead of just rejecting risky :write, :saveas
set confirm
@@ -100,7 +84,9 @@ set cpoptions+=J
set directory^=$MYVIMRUNTIME/cache/swap//
" Use UTF-8 if we can and env LANG didn't tell us not to
-if has('multi_byte') && !exists('$LANG') && &encoding ==# 'latin1'
+if has('multi_byte')
+ \ && !exists('$LANG')
+ \ && &encoding ==# 'latin1'
set encoding=utf-8
endif
@@ -111,10 +97,8 @@ if exists('+esckeys')
endif
" Fold based on indent, but only when I ask
-if has('folding')
- set foldlevelstart=99
- set foldmethod=indent
-endif
+set foldlevelstart=99
+set foldmethod=indent
" Delete comment leaders when joining lines, if supported
if v:version > 703
@@ -185,10 +169,8 @@ if &ruler
endif
" Make sessions usable
-if exists('+sessionoptions')
- set sessionoptions-=localoptions " No buffer options or mappings
- set sessionoptions-=options " No global options or mappings
-endif
+set sessionoptions-=localoptions " No buffer options or mappings
+set sessionoptions-=options " No global options or mappings
" Don't show startup splash screen (I donated)
set shortmess+=I
@@ -202,7 +184,7 @@ set splitright " Right of the current window, not left
" No terminal mouse, even if we could
" The manual says to set 't_RV', but I don't like that
-if exists('+ttymouse') && &ttymouse !=# ''
+if &ttymouse !=# ''
set ttymouse=
endif
@@ -221,9 +203,7 @@ if exists('+wildignorecase')
endif
" Let me move beyond buffer text in visual block mode
-if exists('+virtualedit')
- set virtualedit+=block
-endif
+set virtualedit+=block
" Never beep at me
set visualbell t_vb=
@@ -299,7 +279,7 @@ nnoremap <Leader>f :<C-U>setlocal formatoptions?<CR>
nnoremap <Leader>F :<C-U>doautocmd filetypedetect BufRead<CR>
" \g changes directory to the current file's location
-nnoremap <Leader>g :<C-U>cd %:h<CR>:pwd<CR>
+nnoremap <Leader>g :<C-U>cd %:h<CR>
" \h toggles highlighting search results
nnoremap <Leader>h :<C-U>set hlsearch! hlsearch?<CR>