-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.after
165 lines (128 loc) · 3.84 KB
/
.vimrc.after
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
"
" VIM Customizations.
"
"
" Adjust the colorscheme.
"
syntax on
colorscheme darcula
"
" Update the statusLine.
"
set statusline=%f\ %m\ %rLine:%l/%L[%p%%]Col:%vBuf:#%n[%b][0x%B]\ %{fugitive#statusline()}
" Git Open Plugin.
"
" Update the default font.
"
set guifont=Monaco:h12
"set guifont=Menlo:h12
" Highlight the current line.
set cursorline
" Specify the line length.
set colorcolumn=100
" F3 will display the highlight underneath the cursor.
map <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#")<CR>
" Remove right hand side scroll bar.
set guioptions-=r
" Remove the left hand scrollbar.
set go-=L
" Case insensitive searches.
set smartcase
" Leave insert mode after focus changes.
au FocusLost,TabLeave * call feedkeys("\<C-\>\<C-n>")
" Save files on focus change.
autocmd FocusLost * silent! wa
" Automatically reload file changes.
set autoread
" Run a syntax check when the editor gains focus.
au FocusGained *.coffee :SyntasticCheck
" Disable hiding of quotes in JSON files.
let g:vim_json_syntax_conceal = 0
"
" Set the ack search defaults to ignore certain directories.
"
let ack_ignore="--ignore-dir=public"
let ack_ignore.=" --ignore-dir=node_modules"
let ack_ignore.=" --ignore-dir=docs"
let ack_ignore.=" --ignore-dir=.idea"
let ack_ignore.=" --ignore-dir=vagrant"
let ack_ignore.=" --ignore-dir=.mimosa"
let ack_ignore.=" --ignore-dir=assets/javascripts/vendor"
let ack_ignore.=" --ignore-dir=assets/stylesheets/vendor/"
let ack_ignore.=" --ignore-file=is:tags"
let ack_ignore.=" --ignore-dir=bower_components"
let ack_ignore.=" --ignore-dir=logs --ignore-file=is:get-pip.py"
let g:ackprg = "ack -s -H --nocolor --nogroup --column --smart-case --follow " . ack_ignore
" CtrlP Ignore Files.
"set wildignore+=*/public/*
"set wildignore+=*/.idea/*
"set wildignore+=*/logs/*
"set wildignore+=*/node_modules/*
"set wildignore+=*/bower_components/*
"set wildignore+=*/.mimosa/*
"set wildignore+=*/vagrant/puppet/*
" CtrlP should ignore .gitignore files.
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
" Setup Syntastic checkers.
let g:syntastic_coffee_checkers = ["coffee"]
let g:syntastic_ejs_checkers = ["html"]
let g:syntastic_jade_checkers = ["jade"]
let g:syntastic_javascript_checkers = ["jshint"]
" CtrlP default to vertical split.
"let g:ctrlp_prompt_mappings = {
"\ 'AcceptSelection("e")': ['<c-v>', '<2-LeftMouse>'],
"\ 'AcceptSelection("v")': ['<cr>', '<RightMouse>'],
"\ }
" easier moving of code blocks, indent and keep selection
vnoremap < <gv
vnoremap > >gv
"
" Map the command-p key to CtrlP.
"
map <D-O> :CtrlP<CR>
map <D-e> :CtrlPMRU<CR>
"
" Add underscore template syntax highlighting for .ejs files.
"
au BufRead,BufNewFile *.ejs set filetype=html
au BufRead,BufNewFile *.ejs set syntax=underscore_template
" Add Javascript highlighting for jshintrc files.
autocmd BufNewFile,BufRead *.jshintrc set syntax=javascript
"
" Camel case support.
"
nmap c,w c,e
runtime ~/.janus/camelcasemotion/autoload/camelcasemotion.vim
omap i,w i,e
xmap i,w i,e
nnoremap ,, ,
xnoremap ,, ,
onoremap ,, ,
map w <Plug>CamelCaseMotion_w
map b <Plug>CamelCaseMotion_b
map e <Plug>CamelCaseMotion_e
sunmap w
sunmap b
sunmap e
nmap cw ce
imap <C-w> <C-o>d<Plug>CamelCaseMotion_ie
omap iw <Plug>CamelCaseMotion_iw
xmap iw <Plug>CamelCaseMotion_iw
omap ib <Plug>CamelCaseMotion_ib
xmap ib <Plug>CamelCaseMotion_ib
omap ie <Plug>CamelCaseMotion_ie
xmap ie <Plug>CamelCaseMotion_ie
omap iw ie
xmap iw ie
"
" Reload the vimrc after changes.
"
au! BufWritePost .vimrc.after source %
"
" Start in the projects directory.
"
cd ~/Projects
"
" Eclim Key Mappings.
"
nmap <silent> <c-f9> :call eclim#java#import#Import()<cr>