-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
135 lines (117 loc) · 2.86 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
" !(@) vimrc
" turn filetype detection off
filetype plugin off
" check for a local resources directory
if isdirectory('/usr/share/vim/local')
set runtimepath^=/usr/share/vim/local
endif
" $UHOME is set when we are running as another user
if exists('$UHOME') && isdirectory($UHOME. '/.vim')
set runtimepath^=$UHOME/.vim
endif
" standard preferences
set backspace=indent,eol,start
set expandtab
set formatoptions=tcq
set hlsearch
set ic
set list
"set listchars=tab:→
"set listchars=tab:‸
"set listchars=tab:ˍ
"set listchars=tab:ˍˍ
"set listchars=tab:¬
"set listchars=tab:˽
set listchars=tab:˾
set nobackup
set nocp
set noeb
set nofoldenable
set nomodeline
set nowb
set nowrap
set ruler
set shiftwidth=2
set softtabstop=0
set t_Co=256
set t_vb=
set tabstop=2
set vb
" only enable when i'm feeling lispy
"let loaded_matchparen=1
" gentoo's settings are horrible. all of them.
augroup gentoo
au!
augroup END
" removes annoying errors when writing a read-only file
augroup set_ro
au!
au FileChangedRO * set noreadonly
augroup END
" filetype detection hints
augroup set_filetype
au!
au BufNewFile,BufRead *.pc setf c
au BufNewFile,BufRead *.psgi setf perl
au BufNewFile,BufRead *.p6sgi setf perl6
au BufNewFile,BufRead *.pgsql setf pgsql
au BufNewFile,BufRead *.plpgsql setf pgsql
augroup END
" filetype options
augroup set_fileopts
au!
"au FileType c set noautoindent cindent
"au FileType cpp set noautoindent cindent
au FileType go set noexpandtab
"au FileType go map <M-F> :!go fmt %<CR>:echo 'go fmt ran'<CR>
au FileType list set lisp
au FileType make set noexpandtab
au FileType perl let perl_extended_vars=1
au FileType python let python_highlight_all=1
au FileType scheme set lisp
au FileType text syntax on
"au FileType sql set filetype=plsql
"au FileType proc set filetype=c
au FileType * set autoindent
"au VimLeave *.go !go fmt %
augroup END
" default filetype if not set
if $filetype == ""
setf text
endif
" match parens
if version >= 700
augroup set_matchparens
au!
au VimEnter * NoMatchParen
au VimEnter *.scm DoMatchParen
au VimEnter *.lisp DoMatchParen
augroup END
endif
" disable E173 with multiple buffers
if argc() > 1
silent blast
silent bfirst
endif
"set background=light
" syntax highlighting
syntax on
silent! colorscheme muon
"silent! colorscheme pyte
"silent! colorscheme turbo
hi SpecialKey ctermfg=darkgray
" keybindings
mapclear
nnoremap <F1> <NOP>
inoremap <F1> <NOP>
nnoremap <F9> :syntax sync fromstart<CR>
nnoremap <F10> :set expandtab!<CR>
nnoremap <F11> :set ignorecase!<CR>
inoremap <F11> <ESC>:set ignorecase!<CR>i
nnoremap <F12> :set autoindent!<CR>
inoremap <F12> <ESC>:set autoindent!<CR>i
nnoremap <CR> :noh<CR>
map K <NOP>
map q: <NOP>
map <C-N> :bnext<CR>
map <C-P> :bprevious<CR>