forked from brianleroux/quick-vim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc
79 lines (62 loc) · 1.5 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
call pathogen#infect()
syntax on
filetype plugin indent on
set nofoldenable
set nocompatible
set nobackup
set nowb
set noswapfile
" syntax highligting
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
" quiet pls
set visualbell t_vb=
" turn on line numbers
set number
" 4 space softabs default
set expandtab
set ts=2
set sw=2
set backspace=indent,eol,start
let mapleader = " "
map <Leader>n :NERDTreeToggle<CR>
map <Leader><Leader> :ZoomWin<CR>
" Remove trailing spaces
map <Leader>d$ :%s/\s\+$//ge<CR>
map <Leader>a= :Tabularize /=<CR>
map <Leader>a: :Tabularize /:<CR>
map <Leader><LEFT> <C-w>h
map <Leader><DOWN> <C-w>j
map <Leader><UP> <C-w>k
map <Leader><RIGHT> <C-w>l
" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
set laststatus=2
" Open NERDTree if no file specified
autocmd vimenter * if !argc() | NERDTree | endif
" Powerline
let g:Powerline_symbols = 'compatible'
" Remove the top toolbar
set guioptions-=T
" Show a popup whith right click
set mousemodel=popup
" Miscellaneous
" =============
" set filetype to js for files with node shebang thing these files don't have
" an extension. pretty sure there is a plugin for this, for a bunch of
" filetype.
function! s:NodeAndTheBang()
let nodebang = matchstr(getline(1), "^#.*node")
if nodebang != ''
set ft=javascript
endif
endfunction
" call this shebang check on every bufread or newfile
autocmd! BufRead,BufNewFile * call s:NodeAndTheBang()
let g:NERDTreeDirArrows=0
set clipboard=unnamed