-
Notifications
You must be signed in to change notification settings - Fork 3
/
versioned_vimrc.vim
144 lines (106 loc) · 3.2 KB
/
versioned_vimrc.vim
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
" VIM UI
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ruler "Always show current position
set backspace=eol,start,indent
set number
set cursorline
"Ctrl+N x2 toggles line numbers
nmap <C-N><C-N> :set invnumber<CR>
set wildmenu
set ignorecase
set smartcase
set hlsearch
set incsearch "Make search look within strings
set magic "Set magic on, for regexps
set showmatch "Show matching brackets when text indicator on top of one
"Show commands when entered
set showcmd
"Show the filename
set title
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list
" Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax enable "enable syntax
let g:solarized_contrast="high"
let g:solarized_visibility="high"
set background=dark
colorscheme solarized
set t_Co=256
set gfn=Bitstream\ Vera\ Sans\ Mono:h10
set encoding=utf8
set ffs=unix,dos,mac
au BufNewFile,BufRead *.haml* set syntax=haml
"Text, tab, and indents
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
set expandtab
set shiftwidth=2
set tabstop=2
set softtabstop=2
set ai "Auto Indent
vnoremap < <gv
vnoremap > >gv
" center searches
nnoremap n nzz
nnoremap N Nzz
"PLUGINS
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
"NeoBundle
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
filetype off
call neobundle#rc(expand('~/.vim/bundle/'))
"let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
"VimProc!
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
NeoBundle 'Lokaltog/vim-powerline'
NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'mustache/vim-mustache-handlebars'
NeoBundleLazy 'jelera/vim-javascript-syntax', {'autoload':{'filetypes':['javascript']}}
NeoBundle 'embear/vim-localvimrc'
NeoBundle 'tpope/vim-surround'
NeoBundle 'leafgarland/typescript-vim'
let g:localvimrc_persistent = 2
NeoBundle 'sudo.vim'
filetype on
NeoBundleCheck
" CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_arg_map = 1
let g:ctrlp_max_height = 20
let g:ctrlp_clear_cache_on_exit = 0
" the directory at work is ridiculously huge
let g:ctrlp_max_files = 40000
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn|dist)$|build|tmp|node_modules|bower_components',
\ 'file': '\v\.(exe|so|dll|txt|vert|frag|swf|png|jpg|gif|otf|wotf|eot|svg|ttf|pem|patch|pickle|psd|xpi|xrf|xsf|xsl|zip|tga|swp|swo|hi|o|p_o|p_hi)$'
\ }
"POWERLINE
set laststatus=2
set encoding=utf-8
let mapleader = ","
"put vim in interactive mode
set shellcmdflag=-ic
""ETC
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nobackup "dont create .swo
set noswapfile "dont create .swp
set wildignore=*.o,*~,*.pyc,*.swp,*.bak,*.swo,*.ho,*.hi,*.beam "ignore compiled files
nnoremap <C-h> :bprevious<cr>
nnoremap <C-l> :bnext<cr>
nnoremap ,q :bp\|bd #<cr>
nnoremap ,jc Oconsole.log('<C-R>=expand("%:t")<cr>:<C-R>=line('.')<cr>');<Esc>