-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
70 lines (56 loc) · 1.67 KB
/
.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
set tabstop=4
set shiftwidth=4
set expandtab
:imap jj <Esc>
:let mapleader = ","
execute pathogen#infect()
syntax on
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
set relativenumber
set scrolloff=10
set splitbelow
set splitright
nnoremap - :sp<CR><C-w>j
nnoremap \| :vsp<CR><C-w>l
highlight VertSplit guibg=black
highlight StatusLine ctermbg=blue ctermfg=black
highlight StatusLineNC ctermbg=white ctermfg=black
nnoremap <leader>t :tabe<CR>
highlight TabLineFill ctermfg=black ctermbg=blue
highlight TabLine ctermfg=magenta ctermbg=black
highlight TabLineSel ctermfg=green ctermbg=black
highlight Title ctermfg=blue ctermbg=black
set list listchars=tab:\ \ ,trail:· " Visually show bad whitespace
au FocusLost * :%s/\s\+$//e " Remove trailing spaces on focus lost
function! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces() " Remove trailing space on save
"undo files
set history=1000
set undolevels=1000
set undofile
set undodir=~/.vim/tmp/undo//
set noswapfile
set nobackup
set nowb
set runtimepath^=~/.vim/bundle/ctrlp.vim
" Enable autoread, requires :checktime to be run
set autoread
"ctrlp
let g:ctrlp_working_path_mode = 2
let g:ctrlp_custom_ignore = {
\ 'dir': '\v(coverage|docs|reports|node_modules|bower_components|scripts-cov|src-cov|dist|tmp|\.git|\.svn|\.hg).*$',
\ 'file': '\v\.(DS_Store|png|jpg|gif|bak|pdf)$',
\ }
let g:ctrlp_map = '<Leader>f'
let g:ctrlp_show_hidden = 1
"gist
let g:gist_post_private = 1
let g:gist_open_browser_after_post = 1