diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-16 23:43:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-17 00:00:24 +1200 |
commit | 420337569e98083944f3300e45a3b1e086b38811 (patch) | |
tree | 02c757974f98e26db96ba3092ece210806dd15b4 /vim | |
parent | Remove `a` and `A` flags from 'cpoptions' (diff) | |
download | dotfiles-420337569e98083944f3300e45a3b1e086b38811.tar.gz dotfiles-420337569e98083944f3300e45a3b1e086b38811.zip |
Move filetype and syntax logic to end of .vimrc
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -13,24 +13,6 @@ if !exists('$MYVIMRUNTIME') \ ) endif -" Load filetype settings, plugins, and maps -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 @@ -120,7 +102,8 @@ if v:version > 801 set formatoptions+=p endif -" Don't load GUI menus; set here before GUI starts +" Don't load GUI menus; set here before GUI starts or any filetype or syntax +" logic is performed if has('gui_running') set guioptions+=M endif @@ -423,5 +406,23 @@ nnoremap <Leader>: ^"zyg_:<C-R>z<CR> " \! executes line with 'shell' nnoremap <Leader>! ^"zyg_:!<C-R>z<CR> +" Load filetype settings, plugins, and maps +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 + " Source any .vim files from ~/.vim/config runtime! config/*.vim |