From d12ec500ba60a1bb75119043ea8b6c4fe05974cb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 6 Jun 2018 20:04:25 +1200 Subject: Move syntax block up --- vim/vimrc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 70f72ed6..4cdf5199 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -27,6 +27,24 @@ 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 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 + " Let me backspace over pretty much anything set backspace= " Allow backspacing over autoindent @@ -265,24 +283,6 @@ vnoremap & :&& " 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 -- cgit v1.2.3