-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
49 lines (37 loc) · 853 Bytes
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
syntax on
filetype plugin indent on
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
syntax enable
set list
set listchars=eol:⏎,tab:␉·,trail:␠,nbsp:⎵
set cursorline
if &diff
set background=light
colorscheme github
set diffopt+=iwhite
else
set background=dark
colorscheme molokai
let NERDTreeShowHidden=1
autocmd vimenter * NERDTree
let g:ctrlp_dont_split = 'nerdtree'
endif
set wrap
set nu
au VimEnter * if &diff | execute 'windo set wrap' | endif
autocmd BufWritePre * :%s/\s\+$//e
set expandtab
set tabstop=4
set shiftwidth=2
set shell=/bin/sh
set colorcolumn=80
function TrimEndLines()
let save_cursor = getpos(".")
:silent! %s#\($\n\s*\)\+\%$##
call setpos('.', save_cursor)
endfunction
au BufWritePre * call TrimEndLines()