From 44547fd2a02a5ab325cf7bb52140225bbb0a4ee1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 May 2019 14:15:48 +1200 Subject: Remove Vim 'grepprg' setting I am almost always using :vimgrep nowadays, and it seems wrong to fire up the system grep(1) every time I start Vim. --- vim/vimrc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 3a51a829..5eb139dd 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -127,11 +127,6 @@ if v:version > 801 set formatoptions+=p endif -" If available, use GNU grep niceties for searching -if system('grep --version') =~# '^grep (GNU grep)' - set grepprg=grep\ -HnRs\ --exclude='.git*' -endif - " Don't load GUI menus; set here before GUI starts if has('gui_running') set guioptions+=M -- cgit v1.2.3 From 821828153e933396a7033061701582c4764dac92 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 May 2019 14:34:01 +1200 Subject: Refactor colorscheme logic a little --- vim/vimrc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 5eb139dd..6b85ea37 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -27,21 +27,25 @@ if has('syntax') syntax enable endif - " Use my colorscheme if using the GUI or if we have 256 colors - if has('gui_running') || &t_Co >= 256 - silent! colorscheme sahara - endif + " Colorscheme handling + try + + " Use sahara.vim colorscheme, if using gVim or a 256-color term + if has('gui_running') || &t_Co >= 256 + colorscheme sahara + else + throw 'Not loading sahara on this terminal' + endif - " If my colorscheme loaded, turn on subtle 'cursorline' coloring - if exists('colors_name') && colors_name ==# 'sahara' + " Use the colorscheme's subtle 'cursorline', if it loaded if exists('+cursorline') set cursorline endif - " If it didn't load, default to default scheme with dark background - else + " Otherwise, use the default colorscheme with a dark background + catch set background=dark - endif + endtry endif -- cgit v1.2.3 From 6b95e90cebb6837846e7a8a3d3efff41e6630b66 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 11 May 2019 11:13:28 +1200 Subject: Set up custom ftplugin for plain text files --- vim/ftplugin/text.vim | 14 ++++++++++++++ vim/vimrc | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 vim/ftplugin/text.vim diff --git a/vim/ftplugin/text.vim b/vim/ftplugin/text.vim new file mode 100644 index 00000000..a5dc810f --- /dev/null +++ b/vim/ftplugin/text.vim @@ -0,0 +1,14 @@ +" The 'text' filetype was only added in v7.4.365, so anything older than this +" requires our own filetype plugin to prevent the b:undo_ftplugin extensions +" in after/ftplugin/text.vim from panicking. +if v:version > 704 + \ || v:version == 703 && has('patch365') + finish +endif +let b:did_ftplugin = 1 + +" Set comment metacharacters +setlocal comments+=fb:- " Dashed lists +setlocal comments+=fb:* " Bulleted lists +setlocal comments+=n:> " Mail quotes +let b:undo_ftplugin = 'setlocal comments<' diff --git a/vim/vimrc b/vim/vimrc index 6b85ea37..17282ce1 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -82,8 +82,9 @@ if exists('+breakindent') set breakindent endif -" Clear default 'comments' value, let the filetype handle it +" Clear default 'comments' and 'commentstring', filetype to handle set comments= +set commentstring= " Add completion options if exists('+completeopt') -- cgit v1.2.3 From 889886329a6b2651bc37466c0c990f6b9a825fd1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 11 May 2019 11:22:34 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index b21e61f8..6b9b13a5 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.22.0 -Thu May 9 23:32:04 UTC 2019 +tejr dotfiles v4.23.0 +Fri May 10 23:22:34 UTC 2019 -- cgit v1.2.3