From e5073155edd4fc8fa006ce35a060ddb41c32d17c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 May 2019 11:21:46 +1200 Subject: Remove redundant :pwd from mapping :cd prints the resulting directory as a side effect anyway. --- vim/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 48ebca1d..f0f0e476 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -299,7 +299,7 @@ nnoremap f :setlocal formatoptions? nnoremap F :doautocmd filetypedetect BufRead " \g changes directory to the current file's location -nnoremap g :cd %:h:pwd +nnoremap g :cd %:h " \h toggles highlighting search results nnoremap h :set hlsearch! hlsearch? -- cgit v1.2.3 From 0ba998736aaceb27d4f46ecea46c46d0d1f8c614 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 May 2019 11:41:24 +1200 Subject: Simplify colorscheme comments --- vim/vimrc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index f0f0e476..2276ffb4 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -27,13 +27,9 @@ if has('syntax') syntax enable endif - " Colorscheme handling + " Try to use sahara colorscheme with 'cursorline' set 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 -- cgit v1.2.3 From 897d4b1f57f6847135ec1b138681b93adeefee1b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 May 2019 11:51:42 +1200 Subject: Remove some overzealous conditions from vimrc Let's try not to solve problems we aren't actually having. --- vim/vimrc | 68 ++++++++++++++++++++++++--------------------------------------- 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 2276ffb4..dbdda4e3 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -14,33 +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 - - " Try to use sahara colorscheme with 'cursorline' set - try - colorscheme sahara - 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 @@ -62,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` @@ -79,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 @@ -96,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 @@ -107,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 @@ -181,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 @@ -198,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 @@ -217,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= -- cgit v1.2.3 From 08e0e4217061f7abd29dab1af14a906a1834e15e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 May 2019 11:52:55 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 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 -- cgit v1.2.3