-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc
131 lines (100 loc) · 2.4 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
121
122
123
124
125
126
127
128
129
130
131
" Vundle stuff
source ~/.bundles.vim
set nocompatible
set modeline
"set spell
" leader comma
let mapleader = ","
set laststatus=2
"set encoding=utf-8
if has("gui_running")
set guifont=Source\ Code\ Pro\ 11
endif
" mac only
if has("gui_macvim")
set guifont=Source\ Code\ Pro:h12
endif
colors zenburn
set hidden
syntax on
set number
set cursorline
set showmatch
set incsearch
set hlsearch
set ruler
set autoread
set mouse=a
set cc=80
set nowrap
set showmatch
set smartcase
set smarttab
filetype plugin indent on
" CtrlP
" Don't change cwd
let g:ctrlp_working_path_mode = '' " or 'rc'
" Mixed mode
let g:ctrlp_cmd = 'CtrlPMixed'
" Gotosymbol Ctrl+R
map <C-R> :CtrlPBufTagAll<CR>
" scan ALL the files
"let g:ctrlp_max_files = 0
" Detect Indent
let g:detectindent_preferred_expandtab = 1
let g:detectindent_preferred_indent = 4
autocmd BufNewFile,BufReadPost * :DetectIndent
autocmd FileType make setlocal noexpandtab
set history=1000
set undolevels=1000
set wildignore+=*.swp,*.bak,*.pyc,*.class,*.o
set title
set pastetoggle=<F3>
" Nerdcommenter binding
map <leader>/ <plug>NERDCommenterToggle
imap <leader>/ <Esc><plug>NERDCommenterTogglei
" Nerdtree binding
map <leader>n :NERDTreeToggle<CR>
nmap <leader>m :NERDTreeFind<CR>
" Nerdtree ingore
let NERDTreeIgnore = ['\.pyc$', '\~$', '\.o$', '\.class$', '\.out$', '\.o$']
" Tagbar binding
nmap <F8> :TagbarToggle<CR>
let g:tagbar_autofocus = 1
" Easybuffer
map <leader>b :EasyBufferToggle<CR>
" Don't select the first completion item, menu still if one match
set completeopt=longest,menuone
noremap <F5> :GundoToggle<CR>
" command mode smartcase completion
set ignorecase
set infercase
" Strip trailing ws
if !exists("*StripWS")
function StripWS()
:%s/\s\+$//e
endfunction
endif
" Disable indent for current file (need to reload file after to enable indent)
if !exists("*DisableIndent")
function DisableIndent()
:setl noai nocin nosi inde=
endfunction
endif
" C-space for omnicomplete
if has("gui_running")
" C-Space seems to work under gVim on both Linux and win32
inoremap <C-Space> <C-x><C-o>
else " no gui
if has("unix")
inoremap <Nul> <C-x><C-o>
else
" I have no idea of the name of Ctrl-Space elsewhere
endif
endif
set backspace=indent,eol,start
let g:ycm_confirm_extra_conf = 0
let javascript_enable_domhtmlcss = 1
" Racer
let g:racer_cmd = "~/localCode/racer/target/release/racer"
let $RUST_SRC_PATH=$HOME . "/localCode/rust/src/"