-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
65 lines (49 loc) · 1.47 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
syntax on
" set background=dark
" Suppress all spaces at end/beginning of lines
nmap _s :%s/\s\+$//<CR>
nmap _S :%s/^\s\+//<CR>
nmap _j :g/\S/,/^\s*$/join<CR>
nmap _w :set wrap lbr tw=0 co=100<CR>
nmap _t :tabnew
nmap _l :set nonu<CR>
nmap _L :set nu<CR>
nmap _h :highlight RedundantSpaces ctermbg=blue guibg=blue<CR>:match RedundantSpaces /\s\+$\| \+\ze\t/<CR>
" Turn off auto-indent for paste
set pastetoggle=<F8>
" Backspace normally
set backspace=indent,eol,start
" Line numbahs ...
set nu
" Use spaces for tabs
set et
" Indent 2 spaces
set ts=2
set sw=2
" Jump to matching brackets
" set sm
" Auto-indent
set ai
set history=1000
" @ will reformat the current paragraph
" map @ !} fmt -w 65
" Cycle through the tabs
map <C-H> :tabp<CR>
map <C-L> :tabn<CR>
abbr #b /*------------------------------------------------
abbr #e -----------------------------------------------*/
cabbr lint !runjslint "`cat %`" \| lynx --force-html /dev/fd/5 -dump 5<&0 \| less
" HTML syntax for .ejs template files
au BufRead,BufNewFile *.ejs set filetype=html
" JS syntax for .as files
au BufRead,BufNewFile *.as set filetype=javascript
set hlsearch
highlight ExtraWhitespace ctermbg=blue guibg=blue
match ExtraWhitespace /\s\+$\| \+\ze\t/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
" autocmd BufWinLeave * call clearmatches()
" PLUGINS
" Nerdtree
let g:NERDTreeWinSize = 40