forked from nicowilliams/env
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
57 lines (47 loc) · 1.13 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
" NO ALTERNATE SCREEN!!!!!
set t_ti= t_te=
set background=dark
" set modelines=0
set encoding=utf-8
set nocompatible
set syntax=enable
syntax on
set ai
set smarttab
set shiftwidth=2
set softtabstop=4
set tabstop=8
set showmode
set tw=72
set hlsearch
filetype plugin on
filetype indent on
set expandtab
set cinoptions=p0,t0,+4,(0,u4,U1,:0
set formatoptions=croqt
" set comments=sr:/*,mb:*,ex:*/,://
autocmd BufNewFile,BufRead /home/nico/ws/heimdal/* set shiftwidth=4 softtabstop=4 expandtab tw=79
autocmd BufNewFile,BufRead /home/nico/ws/jq/* set shiftwidth=2 softtabstop=2 expandtab tw=110
autocmd BufNewFile,BufRead /home/nico/ws/postgres/* set shiftwidth=4 softtabstop=4 noexpandtab tw=110
function! Paste_Func()
let s:inPaste = &paste
if !s:inPaste
set paste
endif
echom s:inPaste
augroup paste_callback
autocmd!
autocmd InsertLeave <buffer> call Paste_End()
augroup END
startinsert
endfunction
function! Paste_End()
augroup paste_callback
autocmd!
augroup END
augroup! paste_callback
if !s:inPaste
set nopaste
endif
endfunction
map _i :call Paste_Func()<cr>