-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc_from_inspiron
329 lines (305 loc) · 8.54 KB
/
.vimrc_from_inspiron
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
"SET>>>
"TAB PREFERENCES">>>
set ts=4
set sts=4
set ai
set si
set sw=4
set et
set modeline
"<<<
" Директорія для складання swp файлів>>>
" Директорія обов'язково має бути присутня для того щоб це працювало
"
set dir=~/.vim/swp
"<<<
" Backupdir>>>
"set backupdir="/tmp,.,~/"
"<<<
" Лінія статусу >>>
" Встановлення лінії статусу >>>
"
" set statusline=%<[%n]\ %f\ %m%r%h%w\ %y\ %{&fileencoding}%=%b\ \ \ %c/%v\ %l/%L\ \ %P\ %a
"
"
" hp mini preference
" set statusline=%<%f%h%m%r\ %b\ %{&fileencoding}\ %l,%c%V\ %P
" inpsiron preference
set statusline=%<%f%h%m%r%=\ %b\ 0x%B\ %l,%c%V\ %P\ format=%{&fileformat}\ file=%{&fileencoding}\ enc=%{&encoding}"
" <<<
" Завжди показувати лінію статусу>>>
set laststatus=2
"<<<
"<<<
" Опція збереження ~ бекап файлів>>>
set backup
"<<<
" Графічні опції>>>
" Це не працює під моєю ОС @see :help guioptions
set guioptions-=t
" Видаляєм toolbar
set guioptions-=T
" Видаляєм іконку
set guioptions-=i
" Видаляєм головне меню
set guioptions-=m
"<<<
" blinking in place of beep>>>
set visualbell
"<<<
" Show line numbers>>>
set number
"<<<
" Ignore case when searching >>>
set ignorecase
"<<<
" Highlight all matches>>>
set hlsearch
"<<<
" Wordwrap - off>>>
set nowrap
"<<<
" Встановлюєм helplang до чого це тут не знаю>>>
set helplang=ru
"<<<
"MENU >>>
set wildmenu
set wcm=<Tab>
"<<<
" Fileencodings >>>
"set fileencodings=ucs-bom,utf-8,default,cp1251,latin1
set fileencodings=ucs-bom,utf-8,cp1251,koi8-r,cp866,latin1,utf-16
"<<<
">>>
set fileformats=unix,dos,mac
"<<<
" Настраиваем переключение раскладок клавиатуры по <C-^> >>>
"set keymap=russian-jcukenwin
set keymap=ukrainian-jcuken
" Раскладка по умолчанию - английская
set iminsert=0
set imsearch=0
"<<<
" Вертикальний diffsplit >>>
set diffopt+=vertical
"<<<
" Підсвічуєм лінію з курсором>>>
set cursorline
"<<<
""<<<
" Підключаєм filetype and indenting>>>
filetype indent on
filetype plugin on
filetype on
"<<<
" Підключаєм синтаксис >>>
syn on
"<<<
" Ініціалізація теми >>>
if has('gui') && has('gui_running')
"colors kib_darktango "slate
" colors koehler
colors zellner
else
"colors kib_darktango
" colors koehler
colors zellner
map q :q!<CR>
endif
"<<<
" MAP>>>
" Mapping F1 - F12>>>
"nnoremap <F5> :make<CR>
map <F5> :cnext<CR>
map <F6> :cprev<CR>
map <S-F5> :cnfile<CR>
map <S-F6> :cpfile<CR>
map <F3> :Hexplore<CR>
map <C-F4> :confirm close<CR>
cmap <C-F4> <ESC><C-F4>
imap <C-F4> <ESC><C-F4>
map <F2> :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR>
imap <F2> <ESC><F2>
imap <F3> <ESC><F3>
map <F4> :tabnew<CR>:e
map <S-F4> :e
map <S-F8> :emenu Encoding.<TAB>
"nmap e :e
"<<<
" Folding maps>>>
map <S-Left> zc
imap <S-Left> <ESC>zc
map <S-Right> zo
imap <S-Right> <ESC>zo
"<<<
" VCS mappings >>>
let mapleader = ','
nmap <Leader>va <Plug>VCSAdd
nmap <Leader>vn <Plug>VCSAnnotate
nmap <Leader>vc <Plug>VCSCommit
nmap <Leader>vd <Plug>VCSDiff
nmap <Leader>vg <Plug>VCSGotoOriginal
nmap <Leader>vG <Plug>VCSGotoOriginal!
nmap <Leader>vl <Plug>VCSLog
nmap <Leader>vL <Plug>VCSLock
nmap <Leader>vr <Plug>VCSReview
nmap <Leader>vs <Plug>VCSStatus
nmap <Leader>vu <Plug>VCSUpdate
nmap <Leader>vU <Plug>VCSUnlock
nmap <Leader>vv <Plug>VCSVimDiff
nmap <Leader>vR <Plug>VCSRevert
"<<<
" Зручні mappings для роботи з split-ами>>>
nmap <C-down> <c-w>w
nmap <C-up> <c-w>W
nmap <C-left> <c-w>h
nmap <C-right> <c-w>l
map + <C-w>+
map _ <C-w>-
"<<<
" OTHER MAPPINGS>>>
map <S-Insert> "+p
imap <S-Insert> <ESC>"+p
imap <C-o> <ESC>:call PhpDoc()<CR>
nmap <C-l> :let &list=!&list<CR>
imap <C-L> <ESC>:if &keymap == 'russian-jcukenwin' <BAR>set keymap=ukrainian-jcuken<BAR>else<BAR>set keymap=russian-jcukenwin<BAR>endif<CR>a
map <Leader>t :ToggleWord<CR>
map <C-c> "+y:let @*=@+<CR>
map <Leader>r :call ResetSnippets()<CR>:e!<CR>
map <F7> :Rake<CR>
"set sp=1>&2\ \|tee
"<<<
"<<<
" Настройки меню>>>
menu &Encoding.&koi8-r :e ++enc=koi8-r<CR>
menu &Encoding.&windows-1251 :e ++enc=cp1251<CR>
menu &Encoding.&ibm-866 :e ++enc=ibm866<CR>
menu &Encoding.&utf-8 :e ++enc=utf-8 <CR>
"<<<
" Настройки скриптів>>>
let g:csound_play_cmd='aplay'
let g:author = "Olexiy Zamkoviy"
let g:snips_author = g:author
let g:footer = ""
let g:load_template = 'ask'
let g:email = "olexiy dot z at gmail dot com"
let g:no_html_toolbar = 'yes'
let g:xml_syntax_folding = 1
"let g:netrw_ftp_cmd="ftp -p"
let g:netrw_ftp_cmd="ftp"
let did_menu_trans=1
" Slimv >>>
"let g:slimv_keybindings=2
"let g:slimv_keybindings=0
"let g:slimv_impl = 'cmucl'
"let g:slimv_lisp = 'cmucl'
"let g:slimv_debug = 1
"let g:slimv_debug_client = 1
"let g:slimv_client = 'python ~/.vim/ftplugin/slimv.py -r "konsole -T Slimv -e @p @s -l /usr/local/bin/scheme -s"'
"let g:slimv_swank_cmd = '! xterm -e sbcl --load /usr/share/common-lisp/source/slime/start-swank.lisp &'
"let g:slimv_repl_open = 0
"let g:slimv_port = 3210
"<<<
" Nekthuth >>>
let g:nekthuth_sbcl = "/home/html/bin/sb"
let g:nekthuth_vsplit = 0
let g:lisp_debug = 'Y'
au FileType lisp map <C-J> :NekthuthSexp<CR>
au FileType lisp map <C-E> :NekthuthTopSexp<CR>
au FileType lisp map <F7> :NekthuthRemote<CR>
"<<<
" Limp >>>
let g:auto_lisp_connection=1
"<<<
" DirDiff>>>
let g:DirDiffExcludes='.svn,*.swp,*~'
"<<<
"let did_install_default_menus=1
"let g:no_plugin_maps = 1
"let g:no_html_tab_mapping=0
"let g:no_html_toolbar=1
" SNIPMATE>>>
let g:snips_author = "Olexiy Zamkoviy"
""<<<
"<<<
" Автокоманди >>>
autocmd BufNewFile,BufRead *.py compiler python
autocmd FileType {xml,xslt,html,mxml} setlocal iskeyword=@,-,\:,48-57,_,128-167,224-235
autocmd FileType {orc,sco} compiler csound
autocmd BufNewFile,BufRead *.orc,*.sco,*.csd compiler csound
autocmd BufNewFile,BufRead *.orc,*.sco,*.csd set syntax=csound
autocmd BufNewFile,BufRead *.mxml set ft=as
autocmd BufNewFile,BufRead *.as,*.mxml set syn=as3
autocmd BufNewFile,BufRead *.mxml compiler as
autocmd BufNewFile,BufRead *.phtml set ft=php
autocmd BufNewFile,BufRead /tmp/sql* set ft=sql
au BufNewFile,BufRead *.asd,*.asdf set ft=lisp
autocmd BufNewFile,BufRead *.haml setlocal foldmethod=indent
autocmd BufNewFile,BufRead .stumpwmrc set ft=lisp
" Ruby
autocmd FileType ruby setlocal tags+=~/.gem/ruby/1.8/gems/tags,/var/lib/gems/1.8/gems/tags,/usr/local/lib/ruby/gems/1.9.1/gems/tags
autocmd FileType ruby source ~/.vim/ftplugin/ruby/ruby_single_test.vim
autocmd FileType ruby call S_(2)
autocmd BufNewFile,BufRead *.erb setfiletype html.ruby
" Lisp
autocmd FileType lisp setlocal tags+=~/src/clbuild/source/tags
autocmd BufNewFile,BufRead Nekthuth.buffer setlocal syn=off
"au BufNewFile,BufRead *.html retab! 2
"au BufNewFile,BufRead *.tpl set noet
"au BufNewFile,BufRead *.tpl retab! 2
"//au BufNewFile,BufRead *.tpl setlocal noet sw=2 ts=2 sts=2 autoindent indentexpr=""
"<<<
" Інше>>>
function DoCommand(cmd)
exe a:cmd
endfunction
function! S_(num)
exe "setlocal ts=".a:num
exe "setlocal sw=".a:num
exe "setlocal sts=".a:num
endfunction
"map <C-]> va}
"map <C-[> vi}
let b:path=$PROJECTDIR
"system(". /home/html/.bash_project > /dev/null;echo $PROJECTDIR")
if 0 && has('gui') && has('gui_running')
exec "cd " . b:path
function LoadSessionIfExists()
if filereadable("session.vim") && confirm("Load session ?", "&yes\n&no") == 1
source session.vim
endif
endfunction
function ConfirmSavingSession()
if filereadable("session.vim") && confirm("Save session ?", "&yes\n&no") == 1
"setlocal sessionoptions-=options
mksession! session.vim
endif
endfunction
autocmd VIMEnter * call LoadSessionIfExists()
autocmd VIMLeave * call ConfirmSavingSession()
endif
"<<<
">>> ToggleWords
let g:toggle_words_dict = {
\ 'sh' : [
\ ['-eq', '-ne'],
\ ['-n', '-z'],
\ ['=', '!='],
\ ['-gt', '-lt'],
\ ['-ge', '-le']
\ ],
\ 'lisp' : [
\ ['t', 'nil'],
\ ['if', 'unless']
\ ]}
aut Filetype sh set iskeyword+=-
""<<<
">>> Moving lines
nnoremap <C-S-DOWN> mz:m+<CR>`z==
nnoremap <C-S-UP> mz:m-2<CR>`z==
inoremap <C-S-DOWN> <Esc>:m+<CR>==gi
inoremap <C-S-UP> <Esc>:m-2<CR>==gi
vnoremap <C-S-DOWN> :m'>+<CR>gv=`<my`>mzgv`yo`z
vnoremap <C-S-UP> :m'<-2<CR>gv=`>my`<mzgv`yo`z
"<<<
" vim:fdm=marker:fmr=>>>,<<<