-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot.vimrc
186 lines (161 loc) · 5.73 KB
/
dot.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
"--------------------------------------
" General
"--------------------------------------
set nocompatible " get out of horrible vi-compatible mode; must be first, as it changes other options
set undolevels=1000
set history=2000
if exists(":filetype")
filetype plugin indent on "detect the type of file
runtime ftplugin/man.vim " to have :Man available
endif
set cindent
set autowrite " automatically save before commands like :next and :make
set viminfo+=! " make sure it can save viminfo
set isk+=_,$,@,%,#,- " none of these should be word dividers, so make them not be
let s:cpo_save=&cpo
set cpo&vim
map! <xHome> <Home>
map! <xEnd> <End>
map! <S-xF4> <S-F4>
map! <S-xF3> <S-F3>
map! <S-xF2> <S-F2>
map! <S-xF1> <S-F1>
map! <xF4> <F4>
map! <xF3> <F3>
map! <xF2> <F2>
map! <xF1> <F1>
map <xHome> <Home>
map <xEnd> <End>
map <S-xF4> <S-F4>
map <S-xF3> <S-F3>
map <S-xF2> <S-F2>
map <S-xF1> <S-F1>
map <xF4> <F4>
map <xF3> <F3>
map <xF2> <F2>
map <xF1> <F1>
map <F9> :set paste!<bar>set paste?<cr>
let &cpo=s:cpo_save
unlet s:cpo_save
if has("autocmd")
filetype plugin indent on
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif " has("autocmd")
"-------------------------------------
" Vim UI
"-------------------------------------
set background=dark
syntax on
if exists(":colorscheme")
colorscheme desert
endif
set ttyfast
"set mouse=a " make sure mouse is used in all cases.
set nomousehide " hide the mouse pointer when characters are typed
set lsp=0 " space it out just like unix
set fillchars=vert:\ ,stl:\ ,stlnc:\
set wildmenu " turn on wild menu
"set number " turn on line numbers
set ruler " Always show current positions along the bottom
set lz " do not redraw while running macros (much faster) (LazyRedraw)
set ignorecase " easier to ignore case for searching
set report=0 " tell us when anything is changed via :...
set cmdheight=2 " it's better to use screen
" setting for the GTK2 GUI
if has("gui_running")
set columns=105 lines=33
colorscheme desert
" set guioptions-=tT
" set guifont=Bitstream\ Vera\ Sans\ Mono\ 10
endif
"-------------------------------------
" Vim locale
"-------------------------------------
set enc=utf-8
set fileencoding=utf-8
set hls
set sw=2
set background=dark
set langmenu=none
syntax on
highlight Comment ctermfg=darkcyan
highlight Search term=reverse ctermbg=4 ctermfg=7
"-------------------------------------
" Visual Cues
"-------------------------------------
set mat=5 " how many tenths of a second to blink matching brackets for
set backspace=2 " indent,eol,start
set showmatch " show matching brackets
set showcmd " Show (partial) command in status line
set incsearch " do incremental searching
set hlsearch " highlight searched for phrases
set splitbelow " splitting a windows will put the window below the current one
set scrolloff=10 " Keep 10 lines (top/bottom) for scope
set novisualbell " don't blink
set noerrorbells " no noises
set laststatus=2 " always show the status line
"set statusline=[%n][File:%f]%m%=[Row:%l][Col:%c][%p%%]
"set statusline=%<[%n]\ %F\ \ Filetype=\%y\ \ %r\ %1*%m%*%w%=%(Line:\ %l%)%4(%)Column:\ %5(%c%V/%{strlen(getline(line('.')))}%)\ %4(%)%p%%
set statusline=[%n]\ %<%f\ %((%1*%M%*%R%Y)%)\ %=%-19(\LINE\ [%3l/%3L]\ COL\ [%02c%03V]%)\ ascii['%02b']\ %P
"------------------------------------
" Text Formatting/Layout
"------------------------------------
set autoindent
set smartindent
set shiftwidth=2
set softtabstop=2
set textwidth=0 " maximum width of text that is being inserted
set linebreak " wrap long lines at a character in 'breakat'
set noexpandtab " use real tabs
set nojoinspaces " insert two spaces after a '.', '?' and '!' with a join command
set smarttab " use tabs at the start of a line, spaces elsewhere
"-------------------------------------
" Folding
"-------------------------------------
set foldenable " Turn on folding
set foldmethod=indent " Make folding indent sensitive
set foldlevel=100 " Don't autofold anything (but I can still fold manually)
set foldopen-=search " don't open folds when you search into them
set foldopen-=undo " don't open folds when you undo stuff
"-------------------------------------
" Mappings
"-------------------------------------
" Optimized timestamp; useful for ChangeLogs.
map <F2> i<C-R>=strftime("%Y-%m-%d %H:%M")<CR> Leonard Schmidt<CR><TAB>* <CR><CR><ESC>--A
map Q gq " Don't use Ex mode, use Q for formatting
"-------------------------------------
" Minibuf
"-------------------------------------
let g:miniBufExplTabWrap = 1 " make tabs show complete (no broken on two lines)
let g:miniBufExplModSelTarget = 1
"-------------------------------------
" Matchit
"-------------------------------------
let b:match_ignorecase = 1
"-------------------------------------
" Perl
"-------------------------------------
let perl_extended_vars=1 " highlight advanced perl vars inside strings
let perl_want_scope_in_variables=1
let perl_include_pod=1
let perl_fold=1
let perl_fold_blocks=1
"-------------------------------------
" C
"-------------------------------------
let c_comment_strings = 1 " hilights strings inside comments
let c_gnu = 1 " set syntax for gnu gcc/g++
let c_space_errors = 1 " show spacing errors
"-------------------------------------
" sh
"-------------------------------------
let highlight_function_name = 1
"-------------------------------------
" settings for :TOhtml
"-------------------------------------
let g:html_use_css = 1
let g:html_use_xhtml = 1
let g:html_number_lines = 1