-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
120 lines (93 loc) · 2.75 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
"http://statico.github.io/vim.html
"http://www.cs.swarthmore.edu/help/vim
"see also
"http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally
"https://github.com/amix/vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
if $TERM == "xterm-256color" || $TERM == "screen-256color"
set t_Co=256
colorscheme zenburn
endif
" more natural (to me) cmdline navigation
:cnoremap <C-A> <Home>
:cnoremap <C-F> <Right>
:cnoremap <C-B> <Left>
:cnoremap <Esc>b <S-Left>
:cnoremap <Esc>f <S-Right>
" I've read this is nice
set nocompatible
" Allow hiding modified buffers (plays nice with Ctrl-P plugin)
set hidden
" Highlight tabs and trailing spaces
set listchars=tab:>\ ,trail:·,extends:>,precedes:<,nbsp:+
set list
"highlight column 80
set cc=80
" toggle line numbers
nmap <leader>l :setlocal number!<CR>
set nu
" Gently highlight the current line
set cursorline
"toggle paste mode
nmap <leader>o :set paste!<CR>
"tab modes
nmap <leader>t :set expandtab tabstop=4 shiftwidth=4 softtabstop=4<CR>
nmap <leader>T :set expandtab tabstop=8 shiftwidth=8 softtabstop=4<CR>
nmap <leader>M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>
nmap <leader>m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2<CR>
" toggle wrap
nmap <leader>w :setlocal wrap!<CR>:setlocal wrap?<CR>
"everybody's buffering...
nmap <C-b> :CtrlPBuffer<CR>
nmap <F9> :CtrlPMRU<CR>
nmap <leader>n :bnext<CR>
nmap <leader>p :bprev<CR>
"nerd
nmap <leader>e :NERDTreeToggle<CR>
nmap <leader>@ :NERDTreeFind<CR>
"quicker comments
nmap ,/ gcc
vmap ,/ gc
imap ,/ <Esc>gcci
" tabs
nmap ,T :tabnew<CR>
nmap ,{ :tabprev<CR>
nmap ,} :tabnext<CR>
"ctrl-p
let g:ctrlp_reuse_window = 1
set wildignore+=node_modules/**,coverage/**,bdd/vendor/**,bdd/page_dumps/**
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|coverage$\|node_modules$\|bower_components$\|vendor$\|page_dumps$',
\ 'file': '',
\ 'link': '',
\}
" * Enable vim-airline tabline
let g:airline#extensions#tabline#enabled = 1
" Always display the status line, even if only one window is displayed
set laststatus=2
" Use visual bell instead of beeping when doing something wrong
set visualbell
" Enable use of the mouse for all modes
set mouse=a
" Smart searches
set ignorecase
set smartcase
" Natural splits
set splitbelow
set splitright
" File types
au BufRead,BufNewFile *.md set filetype=markdown
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_eslint_exec = "eslint_d"
" JS Stuff
let g:jsx_ext_required = 0 " vim-jsx