-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
609 lines (473 loc) · 16.7 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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
source ~/.vim/bundles.vim " list of all plugins
source ~/.vim/global.vim " global stuff as nocompatible, syntax on
source ~/.vim/plugins.vim " settings for plugins
source ~/.vim/macros.vim
if has('gui_running')
source ~/.vim/gvimrc
end
" vimrc is loaded BEFORE the plugins
source ~/.vim/before.vim
":let $cur_project = '~/work/MarvinProject/' "current working derectory
:let $cur_project = '~/work/aimpr/' "current working derectory
let g:enable_numbers = 0
Bundle "myusuf3/numbers.vim"
Bundle "mattn/pastebin-vim"
"Bundle 'mikewest/vimroom'
Bundle "pangloss/vim-javascript"
"g:javascript_conceal = 1
"Bundle 'majutsushi/tagbar'
"Bundle "kien/tabman.vim"
"Bundle "vim-scripts/loremipsum"
"Bundle "gorkunov/smartgf.vim"
Bundle "gorkunov/smartpairs.vim"
"Bundle "kien/rainbow_parentheses.vim"
"Bundle "skammer/vim-css-color"
Bundle "maksimr/vim-translator"
Bundle "mtscout6/vim-cjsx"
Bundle "othree/html5.vim"
Bundle "evanmiller/nginx-vim-syntax"
autocmd BufNewFile,BufRead *.csx,*.cjsx set filetype=coffee
let g:goog_user_conf = {
\'langpair': 'en|ru',
\'cmd': 'node',
\'v_key': 'T'
\}
Bundle 'noahfrederick/Hemisu'
"Bundle 'powerman/vim-plugin-ruscmd'
Bundle 'flazz/vim-colorschemes'
colorscheme molokai
":set background=light
"let molokai_original = 1
"let g:rehash256 = 1
"colorscheme Tomorrow-Night-Eighties
"colorscheme Tomorrow-Night
set t_Co=256
set autoindent
set smartindent
set smarttab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set autoread
set smartcase " Override the 'ignorecase' option if the search pattern contains upper case characters
set incsearch
set shiftround " drop unused spaces
"set wrap " перенос длинных строк
set lbr " переносить целые слова
set mousehide " скрывать мышь в режиме ввода текста
set encoding=utf-8
set nu " Номерация строк
"set visualbell "No sounds
set laststatus=2
set ignorecase " Игнорировать регистр букв при поиске
set guitablabel=%t " tab name
set nobackup " Отключаеd создание бэкапов
set noswapfile " Отключаем создание swap файлов
set clipboard=unnamed " Работать с буфером обмена сиситемы
" Убрать тулбары
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=L "remove right-hand scroll bar
filetype on
filetype plugin on
filetype indent on
set guifont=Menlo\ Regular\ for\ Powerline:h14
let g:Powerline_symbols = 'fancy' " Powerline (makes neat status bar)
" hide bold vertical line (line, which is part of dotvim from astrails) https://github.com/astrails/dotvim/issues/14
let g:indent_guides_enable_on_vim_startup = 1
set ts=2 sw=2 et
nmap <leader>v :edit $MYVIMRC<CR>
nnoremap <leader>vs :source $MYVIMRC<CR>
" enabling indicate switching to insert mode
" http://stackoverflow.com/questions/6488683/how-do-i-change-the-vim-cursor-in-insert-normal-mode/6489348#6489348
:autocmd InsertEnter,InsertLeave * set cul!
" enabling moving line up or down
inoremap <C-j> <Esc>:m+<CR>==gi
nnoremap <C-k> mz:m-2<CR>`z==
inoremap <C-k> <Esc>:m-2<CR>==gi
vnoremap <C-j> :m'>+<CR>gv=`<my`>mzgv`yo`z
nnoremap <C-j> mz:m+<CR>`z==
vnoremap <C-k> :m'<-2<CR>gv=`>my`<mzgv`yo`z
" http://vim.wikia.com/wiki/Insert_newline_without_entering_insert_mode
map <S-Enter> O<Esc>j
map <CR> o<Esc>k
" http://vim.wikia.com/wiki/Drag_words_with_Ctrl-left/right
:vmap <C-l> xpgvlolo
:vmap <C-h> xhPgvhoho
" enable unselecting of searchig results by press space key two times or escape key
"map <SPACE> <SPACE>:noh<CR>
nnoremap <esc> :noh<return><esc>
map <C-s> :w
" saving by press Ctrl+S
noremap <silent> <C-S> :update<CR>
vnoremap <silent> <C-S> <C-C>:update<CR>
inoremap <silent> <C-S> <C-O>:update<CR>
fu! SaveSess()
execute 'mksession! ' . getcwd() . '/.session.vim'
endfunction
fu! RestoreSess()
if filereadable(getcwd() . '/.session.vim')
execute 'source ' . getcwd() . '/.session.vim'
if bufexists(1)
for l in range(1, bufnr('$'))
if bufwinnr(l) == -1
exec 'sbuffer ' . l
endif
endfor
endif
endif
syntax on
endfunction
if has('gui_running')
if 0 == argc()
:cd $cur_project
"autocmd VimLeave * call SaveSess()
"autocmd VimEnter * call RestoreSess()
end
end
" Mappings for working with splits
" mapings from very very lazy man from there: http://vim.wikia.com/wiki/VimTip427 with my modifications
" Maps Alt-[h,j,k,l] to resizing a window split
:let resize_w = 20
:let resize_h = 5
map <silent> <A-h> :exe "vertical resize " . (winwidth(0) - resize_w)<CR>
map <silent> <A-j> :exe "resize " . (winheight(0) - resize_h)<CR>
map <silent> <A-k> :exe "resize " . (winheight(0) + resize_h)<CR>
map <silent> <A-l> :exe "vertical resize " . (winwidth(0) + resize_w)<CR>
" Maps Alt-[s.v] to horizontal and vertical split respectively
map <silent> <M-s> :split<CR>
map <silent> <M-v> :vsplit<CR>
" Maps Alt-[n,p] for moving next and previous window respectively
map <silent> <A-n> <C-w><C-w>
map <silent> <A-p> <C-w><S-w>
" half-page smooth-scrolling
:map <C-U> <C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y>
:map <C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E>
nnoremap <F3> :NumbersToggle<CR>
let g:pastebin_api_dev_key = '8433a2d6cfbfb3977ee3339fcd481903'
let g:pastebin_private = '1'
nnoremap <leader>vr :VimroomToggle<cr>
let g:NERDTreeWinPos = 'right'
let g:NERDTreeWinSize = 40
let g:NERDTreeRespectWildIgnore = 0
ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
if exists('+colorcolumn')
" ruler http://stackoverflow.com/a/3765575/1171144
set colorcolumn=81
else
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
endif
"function! StartUp()
"if 0 == argc()
"NERDTree
"end
"endfunction
if has('gui_running')
" fuck that, because on start with saved session
" it add yet anoter NERDTree window
" autocmd VimEnter * call StartUp()
end
" http://vim.wikia.com/wiki/Search_all_files_in_project_quickly
map _u :call ID_search()<Bar>execute "/\\<" . g:word . "\\>"<CR>
map _n :n<Bar>execute "/\\<" . g:word . "\\>"<CR>
function! ID_search()
let g:word = expand("<cword>")
let x = system("lid --key=none ". g:word)
let x = substitute(x, "\n", " ", "g")
execute "next " . x
endfun
" select all
"noremap <c-a> ggVG
" http://vim.wikia.com/wiki/Open_PDF_files
":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> -
":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - |fmt -csw78
set grepprg=ack
hi level13c ctermfg=darkgreen guifg=darkgreen
" from http://vimcasts.org/episodes/working-with-tabs/
" For mac users (using the 'apple' key)
"map <D-S-]> gt
"map <D-S-[> gT
"map <D-1> 1gt
"map <D-2> 2gt
"map <D-3> 3gt
"map <D-4> 4gt
"map <D-5> 5gt
"map <D-6> 6gt
"map <D-7> 7gt
"map <D-8> 8gt
"map <D-9> 9gt
"map <D-0> :tablast<CR>
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/#important-vimrc-lines
nnoremap <leader>w <C-w>v<C-w>l
"key mapping for tab navigation
nmap <Tab> gt
nmap <S-Tab> gT
":au FocusLost,BufLeave,InsertLeave * silent! :update
:au FocusLost,BufLeave * silent! :update
" not working
"Bundle 'sjl/vitality.vim'
"autocmd BufLeave,FocusLost * silent! wall
"autocmd! FocusGained
nnoremap ; :
vnoremap ; :
cnoremap ; :
inoremap kk <Esc>
" I can type :help on my own, thanks.
noremap <F1> <Esc>
" ****************** SCROLLING *********************
set scrolloff=20 " Number of lines from vertical edge to start scrolling
set sidescrolloff=15 " Number of cols from horizontal edge to start scrolling
set sidescroll=1 " Number of cols to scroll at a time
" Resize splits when the window is resized
au VimResized * exe "normal! \<c-w>="
""maximize vim window
"com! MAX :let &lines=500<bar>let &columns=500
"map <leader>m :MAX<CR> move the cursor in insert mode
" move the cursor in insert mode
imap <C-h> <C-o>h
imap <C-j> <C-o>j
imap <C-k> <C-o>k
imap <C-l> <C-o>l
" Jump to start and end of line using the home row keys
nnoremap <c-h> ^
nnoremap <c-l> $
" Remove All the Trailing Whitespacesa (http://vimbits.com/bits/47)
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<cr>
" Highlight word at cursor without changing position (http://vimbits.com/bits/19)
nnoremap <leader>h *<C-O>
" Highlight word at cursor and then Ack it.
nnoremap <leader>H *<C-O>:AckFromSearch!<CR>
" Avoiding trailing white-space in Ruby files
"autocmd BufWritePre {*.rb,*.js,*.coffee,*.scss,*.haml} :%s/\s\+$//e
" Open help to the right or in new tab
cnoremap <expr> hr getcmdtype() == ':' && empty(getcmdline()) ? 'bo vert h ' : 'hr'
cnoremap <expr> ht getcmdtype() == ':' && empty(getcmdline()) ? 'tab h ' : 'ht'
" When opening a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
" start gVim maximized? [not working]
"au GUIEnter * simalt ~x
"let g:NERDTreeQuitOnOpen = 1
cnoremap <C-j> <t_kd>
cnoremap <C-k> <t_ku>
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
" Make Y behave like other capitals
nnoremap Y y$
" split right or below
set splitright
set splitbelow
" http://goo.gl/Upx7U
noremap <silent> <F4> :let @+=expand("%:p")<CR>
" for ctrl-vk
au BufWritePre *.coffee checktime
" Move tabs with alt + left|right
nnoremap <silent> <A-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <A-Right> :execute 'silent! tabmove ' . tabpagenr()<CR>
Bundle 'nelstrom/vim-visual-star-search'
Bundle 'Lokaltog/vim-easymotion'
let g:EasyMotion_leader_key = '<Leader>e'
" next few lines taken from here https://github.com/freshtonic/dotfiles/blob/master/vimrc
" Easier to type, and I never use the default behavior.
noremap H ^
noremap L g_
" Same when jumping around
nnoremap g; g;zz
nnoremap g, g,zz
Bundle 'airblade/vim-gitgutter'
nmap gh <Plug>GitGutterNextHunk
nmap gH <Plug>GitGutterPrevHunk
vmap <silent> u <esc>:Gdiff<cr>gv:diffget<cr><c-w><c-w>ZZ
Bundle 'Shougo/neocomplcache'
let g:neocomplcache_enable_at_startup = 1
Bundle 'terryma/vim-multiple-cursors'
Bundle 'terryma/vim-expand-region'
set wildignore+=*/tmp/*,*.swp,*.zip,*.png,*.jpg,*.jpeg,*.gif
" it's not wirking when g:ctrlp_user_command is set
" not working with public :-(
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$\|public',
\ 'file': '\v\.(png|jpg|jpeg|gif)$',
\ }
" overwirte variable from ~/.vim/plugins.vim
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files --exclude-standard -co |& egrep -v "\.(png|jpg|jpeg|gif)$"']
let g:ctrlp_mruf_exclude = '/tmp/.*'
let g:ctrlp_max_files = 20000
let g:ctrlp_max_files=0
let g:ctrlp_max_depth = 40
Bundle 'tacahiroy/ctrlp-funky'
nnoremap <leader>f :CtrlPFunky<Cr>
"nnoremap <Space>fU :execute 'CtrlPFunky '.expand('<cword>')<Cr>
let g:ctrlp_buffer_func = { 'enter': 'MyCtrlPMappings' }
func! MyCtrlPMappings()
nnoremap <buffer> <silent> <c-@> :call <sid>DeleteBuffer()<cr>
endfunc
func! s:DeleteBuffer()
exec "bd" fnamemodify(getline('.')[2:], ':p')
exec "norm \<F5>"
endfunc
" https://gist.github.com/andyfowler/1195581#comment-816251
"Bundle 'sjl/vitality.vim'
Bundle 'milkypostman/vim-togglelist'
filetype on
filetype plugin on
filetype indent on
syntax on
let g:gist_clip_command = 'pbcopy'
":set &t_Co=256
"Bundle 'rking/vim-detailed'
"colo detailed
autocmd BufReadPost * call SetCursorPosition()
function! SetCursorPosition()
if &filetype !~ 'commit\c'
if line("'\"") > 0 && line("'\"") <= line("$")
exe "normal! g`\""
normal! zz
endif
end
endfunction
set foldcolumn=4
" Folding - http://vim.wikia.com/wiki/Folding {{{1
" Customized version of folded text, idea by
" http://www.gregsexton.org/2011/03/improving-the-text-displayed-in-a-fold/
function! NeatFoldText() "{{{2
let line = ' ' . substitute(getline(v:foldstart), '^\s*"\?\s*\|\s*"\?\s*{{' . '{\d*\s*', '', 'g') . ' '
let lines_count = v:foldend - v:foldstart + 1
let lines_count_text = '| ' . printf("%10s", lines_count . ' lines ')
let foldchar = matchstr(&fillchars, 'fold:\zs.')
let foldtextstart = strpart('+' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
let lineCount = line("$")
let foldPercentage = printf("[%.1f", (lines_count*1.0)/lineCount*100) . "%] "
let foldtextend = lines_count_text . foldPercentage . repeat(foldchar, 8)
let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
return foldtextstart . repeat(foldchar, winwidth(0)-foldtextlength) . foldtextend
endfunction
"}}}
set foldtext=NeatFoldText()
function! MarkdownFolds()
let thisline = getline(v:lnum)
if match(thisline, '^##') >= 0
return ">2"
elseif match(thisline, '^#') >= 0
return ">1"
else
return "="
endif
endfunction
" markdown folding {{{3
function! MarkdownFoldText()
let foldsize = (v:foldend-v:foldstart)
return getline(v:foldstart).' ('.foldsize.' lines)'
endfunction
au BufEnter *.md setlocal foldexpr=MarkdownFolds()
au BufEnter *.md setlocal foldmethod=expr
au BufEnter *.md setlocal foldtext=MarkdownFoldText()
au BufEnter *.md setlocal syntax=markdown
" }}}
set foldmethod=syntax
set foldlevelstart=1
let javaScript_fold=1 " JavaScript
let perl_fold=1 " Perl
let php_folding=1 " PHP
let r_syntax_folding=1 " R
let ruby_fold=1 " Ruby
let sh_fold_enabled=1 " sh
let vimsyn_folding='af' " Vim script
let xml_syntax_folding=1 " XML
" Marker only vim files
:autocmd FileType vim setlocal fdm=marker
:autocmd FileType coffee setlocal fdm=indent
:autocmd FileType haml setlocal fdm=indent
nnoremap <Space> za
"}}}
Bundle 'rking/ag.vim'
"Bundle 'Floobits/floobits-vim'
"не работает на макмини
"Bundle 'rorymckinley/vim-rubyhash'
noremap <silent> <F4> :let @+ = expand("%")<CR> "http://goo.gl/W5wFy
Bundle 'moll/vim-bbye'
" 'quote' a word
"nnoremap qw :silent! normal mpea'<Esc>bi'<Esc>`pl
" double "quote" a word
"nnoremap qd :silent! normal mpea"<Esc>bi"<Esc>`pl
" remove quotes from a word
"nnoremap wq :silent! normal mpeld bhd `ph<CR>
Bundle 'rizzatti/funcoo.vim'
Bundle 'rizzatti/dash.vim'
:nmap <silent> <leader>d <Plug>DashSearch
let g:ruby_path=$RUBY_BIN
" GREAT! make shorcuts sj , sk
Bundle 'AndrewRadev/splitjoin.vim'
highlight NonText guifg=bg
" http://stackoverflow.com/questions/11993851/how-to-delete-not-cut
"nnoremap d "_d
"vnoremap d "_d
"set wrap
set synmaxcol=120
"Bundle 'onemanstartup/vim-flog'
"silent exe 'g:flog_enable'
"Bundle 'rainerborene/vim-reek'
"let coffee_lint_options = '-f ~/.coffeelint_config.json'
set cursorline
" Great! - to toggle some definitions
nnoremap - :Switch<cr>
set relativenumber
set number
"}}}
" 21 executing external commands{{{
" TODO: Check for usefullness of zsh in vim
" set sh=/usr/local/bin/zsh
"}}}
" 22 running make and jumping to errors
" 23 language specific{{{
" Russian is specific
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
"}}}
"
set autoread
autocmd BufNewFile,BufRead,BufReadPost *.eco set syntax=html
autocmd BufNewFile,BufRead,BufReadPost *.eco set fdm=indent
autocmd BufNewFile,BufRead,BufReadPost *.eco set syntax=html
autocmd BufNewFile,BufRead,BufReadPost *.html set syntax=html
autocmd BufNewFile,BufRead,BufReadPost *.html set fdm=indent
autocmd BufNewFile,BufRead,BufReadPost *.html set syntax=html
"http://stackoverflow.com/a/927634/1171144
autocmd CursorHold * checktime
autocmd BufNewFile,BufRead,BufReadPost *.slim set syntax=html
autocmd BufNewFile,BufRead,BufReadPost *.slim set fdm=indent
autocmd BufNewFile,BufRead,BufReadPost *.slim set syntax=slim
autocmd BufNewFile,BufRead,BufReadPost *.cap set syntax=ruby
" This plugin adds ic, ac, iC, and aC as text-objects. Use them in commands like vic, cic, and daC.
Bundle 'coderifous/textobj-word-column.vim'
" align
Bundle 'junegunn/vim-easy-align'
vnoremap <silent> <Enter> :EasyAlign<Enter>
:nmap cp :let @* = expand("%")<CR>
"set guifont=Source\ Code\ Pro\ 14
let g:exchange_no_mappings=1
nmap cx <Plug>(Exchange)
vmap X <Plug>(Exchange)
nmap cxc <Plug>(ExchangeClear)
nmap cxx <Plug>(ExchangeLine)
Bundle 'onemanstartup/vim-slim.git'
syntax enable
filetype plugin indent on
let g:ackprg = 'ag --nogroup --nocolor --column'
Bundle 'vim-scripts/loremipsum'
" http://stackoverflow.com/a/15867373/1171144
nnoremap K :help <C-r><C-w><CR>
highlight Cursor guibg=red
"test
nnoremap <leader>t :w\|:!rspec --color %<cr>
Bundle 'tpope/vim-rvm'
:autocmd BufEnter * Rvm
" http://www.reddit.com/r/vim/comments/2xl1nz/getting_cut_copy_paste_to_feel_native/
"vnoremap <C-c> "*y
"vnoremap <D-c> "*y
"vnoremap <C-x> "*d
"vnoremap <D-x> "*d
"inoremap <C-v> <Esc>:set paste<CR>i<C-r>*<Esc>:set nopaste<CR>a
"inoremap <D-v> <Esc>:set paste<CR>i<C-r>*<Esc>:set nopaste<CR>a