[vim] Colors and mappings and syntax highlighting

This commit is contained in:
Eryn Wells 2014-05-02 08:29:34 -07:00
parent 8082253652
commit ad7cd6044b
2 changed files with 41 additions and 10 deletions

27
vimrc
View file

@ -129,12 +129,16 @@ if &t_Co > 2 || has('gui_running')
syntax on " turn on syntax highlighting
endif
set bg=dark
if $ITERM_PROFILE =~# '[Ll]ight'
set bg=light
else
set bg=dark
endif
" Try to use the solarized colorscheme if the terminal can support it (or we're in a GUI)
try
let g:solarized_termtrans = 1 " transparent terminals
let g:solarized_visibility = 'low' " visibility of list chars
let g:solarized_termtrans = 0 " transparent terminals
"let g:solarized_visibility = 'low' " visibility of list chars
colorscheme solarized
endtry
@ -242,13 +246,6 @@ nnoremap <leader>fa :%s/\v
nnoremap <leader>f :call SelectaCommand("find * -type f", "", ":e")<cr>
" Toggle position highlighting
augroup cursor_position
autocmd!
autocmd InsertEnter * setlocal nocursorline
autocmd InsertLeave * setlocal cursorline
augroup END
nnoremap <silent> <leader>cl :setlocal invcursorline<CR>
nnoremap <silent> <leader>cc :setlocal invcursorcolumn<CR>
@ -274,6 +271,9 @@ let g:gitgutter_enabled = 0
highlight clear SignColumn
nnoremap <silent> <leader>gg :ToggleGitGutter<CR>
" Don't underline folded lines
highlight Folded cterm=bold
" Autocommands {{{
if has('autocmd')
filetype plugin indent on
@ -308,6 +308,13 @@ if has('autocmd')
autocmd!
autocmd BufRead SCons{truct,cript} setf python
augroup END
" Toggle position highlighting
augroup HighlightCursorLineInNormalMode
autocmd!
autocmd InsertEnter * setlocal nocursorline
autocmd InsertLeave * setlocal cursorline
augroup END
endif
" }}}