some more vimrc stuff
This commit is contained in:
parent
e9c8c499e0
commit
6b5ed190ec
1 changed files with 21 additions and 3 deletions
24
.vimrc
24
.vimrc
|
|
@ -1,10 +1,10 @@
|
||||||
" Execute pathogen
|
" Execute pathogen
|
||||||
execute pathogen#infect()
|
execute pathogen#infect()
|
||||||
|
|
||||||
" Load NERDTree plugin
|
" Load NERDTree plugin only if opening vim without a file
|
||||||
"autocmd VimEnter * NERDTree
|
"autocmd VimEnter * NERDTree
|
||||||
"autocmd StdinReadPre * let s:std_in=1
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||||
|
|
||||||
" Remember position in file
|
" Remember position in file
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
|
|
@ -14,6 +14,24 @@ endif
|
||||||
" Enable syntax highlighting
|
" Enable syntax highlighting
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
|
" Show line numbers
|
||||||
|
set number
|
||||||
|
" Set line number color
|
||||||
|
" Get colors here:
|
||||||
|
" http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim
|
||||||
|
highlight LineNr ctermfg=220 guifg=#ffd700
|
||||||
|
|
||||||
|
" Highlight current line and disable highlighting in insert mode
|
||||||
|
set cursorline
|
||||||
|
hi CursorLine cterm=NONE ctermbg=17 ctermfg=white guibg=#00005f guifg=white
|
||||||
|
"hi CursorColumn cterm=NONE ctermbg=17 ctermfg=white guibg=#00005f guifg=white
|
||||||
|
augroup CursorLine
|
||||||
|
au!
|
||||||
|
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
|
||||||
|
au InsertEnter * setlocal nocursorline
|
||||||
|
au InsertLeave * setlocal cursorline
|
||||||
|
augroup END
|
||||||
|
|
||||||
" Set 'nocompatible' to ward off unexpected things that your distro might
|
" Set 'nocompatible' to ward off unexpected things that your distro might
|
||||||
" have made, as well as sanely reset options when re-sourcing .vimrc
|
" have made, as well as sanely reset options when re-sourcing .vimrc
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue