-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc_twtr
187 lines (160 loc) · 4.56 KB
/
vimrc_twtr
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
" My vimrc file, hopefully now a little cleaner
" -@athuras
"
" Plugins #####################################################################
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#begin()
" Let Vundle manage Vundle
Plugin 'gmarik/vundle' " Required
" Various Plugins
Plugin 'JuliaLang/julia-vim'
Plugin 'Rename'
Plugin 'Rykka/riv.vim'
Plugin 'SirVer/ultisnips'
Plugin 'Valloric/YouCompleteMe'
Plugin 'altercation/vim-colors-solarized'
Plugin 'bling/vim-airline'
Plugin 'craigemery/vim-autotag'
Plugin 'dag/vim2hs'
Plugin 'derekwyatt/vim-scala'
Plugin 'elixir-lang/vim-elixir'
Plugin 'fishcakez/vim-dialyzer'
Plugin 'fishcakez/vim-rebar'
Plugin 'honza/vim-snippets'
Plugin 'jnwhiteh/vim-golang'
Plugin 'kevints/vim-aurora-syntax'
Plugin 'kien/ctrlp.vim'
Plugin 'lambdatoast/elm.vim'
Plugin 'majutsushi/tagbar'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'rizzatti/dash.vim'
Plugin 'rust-lang/rust.vim'
Plugin 'ryanss/vim-hackernews'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
Plugin 'solarnz/thrift.vim'
Plugin 'spiroid/vim-ultisnip-scala'
Plugin 'tomtom/tlib_vim'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-dispatch'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'vim-erlang/vim-erlang-compiler'
Plugin 'vim-erlang/vim-erlang-omnicomplete'
Plugin 'vim-ruby/vim-ruby'
call vundle#end()
filetype plugin indent on
" #############################################################################
" Personal Settings
set hls incsearch
set showcmd showmode
set hidden
set expandtab
set ts=2 sw=2 sts=2
set title
set number
set shell=/bin/bash
set smartindent smarttab showmatch
set ruler
set updatecount=100
nore ; :
set laststatus=2
set encoding=utf-8
set clipboard=unnamed
set noautoread
let mapleader=","
" Stop it from yelling at you
set vb t_vb=
:nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
" Tagbar / NERDTree toggles
nmap <F6> :TagbarToggle<CR>
nmap <F5> :NERDTreeToggle<CR>
" Tab short-commands
cmap :tn :tabn
cmap :tp :tabp
" Delete trailing spaces on exit
au BufWritePre * :%s/\s\+$//e
" Sort Scala Imports using vim-scala on write
au BufWritePre *.scala :SortScalaImports
" Restore Cursor Position on file-open
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
if &t_Co > 2 || has("gui_running")
syntax on
endif
" Spelling in 'english' files.
au BufRead,BufNewFile *.md setlocal spell spellang=en_us
" Aesthetic
syntax on
set background=light
colorscheme solarized
" NERDTree
autocmd vimenter * if !argc() | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Numpad and clicking
set mouse=a " on OSX press ALT + Click
if &term=="xterm" || &term=="xterm-color"
set t_Co=8
set t_Sb=^[4%dm
set t_Sf=^[3%dm
:imap <Esc>Oq 1
:imap <Esc>Or 2
:imap <Esc>Os 3
:imap <Esc>Ot 4
:imap <Esc>Ou 5
:imap <Esc>Ov 6
:imap <Esc>Ow 7
:imap <Esc>Ox 8
:imap <Esc>Oy 9
:imap <Esc>Op 0
:imap <Esc>On .
:imap <Esc>OQ /
:imap <Esc>OR *
:imap <Esc>Ol +
:imap <Esc>OS -
endif
" Resolve YCM and UltiSnips use of <tab>
function! g:UltiSnips_Complete()
call UltiSnips#ExpandSnippet()
if g:ulti_expand_res == 0
if pumvisible()
return "\<C-n>"
else
call UltiSnips#JumpForwards()
if g:ulti_jump_forwards_res == 0
return "\<TAB>"
endif
endif
endif
return ""
endfunction
" UltiSnips expansion trigger within YCM
au BufEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
let g:UltiSnipsExpandTrigger="<C-F>"
" BUILD files are python; highlight appropriately
au BufEnter BUILD set ft=python
" Twitter Python Style ...
au Filetype python setl et ts=2 sw=2
" Tagbar options
nnoremap <silent> <Leader>b :TagbarToggle<CR>
" Keeping ctags sane: looks for tags file in current dir, then up levels until
" it reaches $HOME
" remember: C-W C-] will open in new split (stops from jumping all over proj
set tags=./tags,tags;$HOME
" CtrlP settings see:
" http://stackoverflow.com/questions/21888869/how-to-make-ctrlps-search-directory-change-according-to-nerdtrees-root
let g:ctrlp_root_markers = ['ctrlp_STOP']
let g:NERDTreeChDirMode = 2
let g:ctrlp_working_path_mode = 'rw'
" vim-airline
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
" vim-scala
let g:scala_first_party_namespaces='twitter'
" vim-dash
:nmap <silent> <leader>d <Plug>DashSearch
:nmap <silent> <leader>D <Plug>DashGlobalSearch