File vimrc changed (mode: 100644) (index 46a551b..4ff4113) |
... |
... |
autocmd BufReadPost,BufEnter,BufWinEnter,WinEnter * |
149 |
149 |
\ elseif !&modifiable | |
\ elseif !&modifiable | |
150 |
150 |
\ elseif &readonly | |
\ elseif &readonly | |
151 |
151 |
\ else | |
\ else | |
152 |
|
\ nmap <buffer> <expr> <cr> MyEnter() | |
|
|
152 |
|
\ nnoremap <buffer> <expr> <cr> MyEnter() | |
153 |
153 |
\ endif |
\ endif |
154 |
154 |
function! MyEnter() |
function! MyEnter() |
155 |
155 |
if &filetype == 'qf' |
if &filetype == 'qf' |
|
... |
... |
endfunction |
168 |
168 |
" ------------------------------------------------------------------------------ |
" ------------------------------------------------------------------------------ |
169 |
169 |
" improved A normal mode key |
" improved A normal mode key |
170 |
170 |
|
|
171 |
|
nmap <expr> A libedit#adva#AdvancedA() |
|
|
171 |
|
nnoremap <expr> A libedit#adva#AdvancedA() |
172 |
172 |
|
|
173 |
173 |
" ------------------------------------------------------------------------------ |
" ------------------------------------------------------------------------------ |
174 |
174 |
" text paste motion |
" text paste motion |
|
... |
... |
if executable('par') |
237 |
237 |
endif |
endif |
238 |
238 |
|
|
239 |
239 |
" keys to insert empty lines above/below current line in normal mode |
" keys to insert empty lines above/below current line in normal mode |
240 |
|
nmap <leader>f o<esc> |
|
241 |
|
nmap <leader>F O<esc> |
|
|
240 |
|
nnoremap <leader>f o<esc> |
|
241 |
|
nnoremap <leader>F O<esc> |
242 |
242 |
|
|
243 |
243 |
" ============================================================================== |
" ============================================================================== |
244 |
244 |
" programming |
" programming |
|
... |
... |
nmap <leader>F O<esc> |
247 |
247 |
" custom tag jumps |
" custom tag jumps |
248 |
248 |
|
|
249 |
249 |
" on each next <c-]> press jumps to next tag with same name |
" on each next <c-]> press jumps to next tag with same name |
250 |
|
nmap <silent> <c-]> :silent! call <SID>CallTagJump()<cr> |
|
|
250 |
|
nnoremap <silent> <c-]> :silent! call <SID>CallTagJump()<cr> |
251 |
251 |
|
|
252 |
252 |
function! <SID>CallTagJump() |
function! <SID>CallTagJump() |
253 |
253 |
if &ft == 'help' |
if &ft == 'help' |
|
... |
... |
autocmd BufLeave,BufWinLeave,WinLeave,BufDelete * call libprj#prj#Do('.out.vim') |
316 |
316 |
" imap <c-space> <c-x><c-u> |
" imap <c-space> <c-x><c-u> |
317 |
317 |
|
|
318 |
318 |
" rename operations on <leader>r |
" rename operations on <leader>r |
319 |
|
nmap <leader>rr mr:silent! %s/\C\<<c-r><c-w>\>//g\|normal 'r<left><left><left> |
|
320 |
|
\<left><left><left><left><left><left><left><left><left> |
|
321 |
|
nmap <leader>rf :silent! call ExecInFuncBody('s/\C\<<c-r><c-w>\>//g')<left> |
|
|
319 |
|
nnoremap <leader>rr mr:silent! %s/\C\<<c-r><c-w>\>//g\|normal 'r<left><left> |
|
320 |
|
\<left><left><left><left><left><left><left><left><left><left> |
|
321 |
|
nnoremap <leader>rf :silent! call ExecInFuncBody('s/\C\<<c-r><c-w>\>//g')<left> |
322 |
322 |
\<left><left><left> |
\<left><left><left> |
323 |
|
nmap <leader>rt :silent! tabdo %s/\C\<<c-r><c-w>\>//g<left><left> |
|
324 |
|
nmap <leader>rb :silent! bufdo %s/\C\<<c-r><c-w>\>//g<left><left> |
|
|
323 |
|
nnoremap <leader>rt :silent! tabdo %s/\C\<<c-r><c-w>\>//g<left><left> |
|
324 |
|
nnoremap <leader>rb :silent! bufdo %s/\C\<<c-r><c-w>\>//g<left><left> |
325 |
325 |
|
|
326 |
326 |
" show/hide QuickFix window |
" show/hide QuickFix window |
327 |
327 |
"nmap <leader>c :copen<cr> |
"nmap <leader>c :copen<cr> |
|
... |
... |
set splitbelow |
558 |
558 |
filetype plugin indent on |
filetype plugin indent on |
559 |
559 |
|
|
560 |
560 |
" correct Y key |
" correct Y key |
561 |
|
nmap Y y$ |
|
|
561 |
|
nnoremap Y y$ |
562 |
562 |
|
|
563 |
563 |
" map _= to buffer indentation |
" map _= to buffer indentation |
564 |
|
nmap <silent> _= :call <SID>PreserveAndRun('normal gg=G')<cr> |
|
|
564 |
|
nnoremap <silent> _= :call <SID>PreserveAndRun('normal gg=G')<cr> |
565 |
565 |
|
|
566 |
566 |
" map _$ to removing all ending whitespaces |
" map _$ to removing all ending whitespaces |
567 |
|
nmap <silent> _$ :call <SID>PreserveAndRun('%s/\s\+$//e')<cr> |
|
|
567 |
|
nnoremap <silent> _$ :call <SID>PreserveAndRun('%s/\s\+$//e')<cr> |
568 |
568 |
|
|
569 |
569 |
" use Ctrl-N/P to switch between tabs |
" use Ctrl-N/P to switch between tabs |
570 |
570 |
nnoremap <c-n> gt |
nnoremap <c-n> gt |
|
... |
... |
inoremap <s-insert> <c-r>* |
578 |
578 |
cnoremap <s-insert> <c-r>* |
cnoremap <s-insert> <c-r>* |
579 |
579 |
|
|
580 |
580 |
" toggle line wrapping on <leader>w |
" toggle line wrapping on <leader>w |
581 |
|
nmap <leader>w :set wrap!<cr> |
|
|
581 |
|
nnoremap <leader>w :set wrap!<cr> |
582 |
582 |
|
|
583 |
583 |
" automatically reread Vim's configuration after writing it |
" automatically reread Vim's configuration after writing it |
584 |
584 |
autocmd! BufWritePost $MYVIMRC source $MYVIMRC |
autocmd! BufWritePost $MYVIMRC source $MYVIMRC |
|
... |
... |
nnoremap ` ' |
625 |
625 |
nnoremap <silent> <leader>h :call libcfg#opt#ToggleHlsearch()<cr> |
nnoremap <silent> <leader>h :call libcfg#opt#ToggleHlsearch()<cr> |
626 |
626 |
" these lines are needed for highlight enabling |
" these lines are needed for highlight enabling |
627 |
627 |
nnoremap ,* * |
nnoremap ,* * |
628 |
|
nmap * :set hlsearch<cr>,* |
|
|
628 |
|
nnoremap * :set hlsearch<cr>,* |
629 |
629 |
nnoremap ,# # |
nnoremap ,# # |
630 |
|
nmap # :set hlsearch<cr>,# |
|
|
630 |
|
nnoremap # :set hlsearch<cr>,# |
631 |
631 |
|
|
632 |
632 |
" smart case policy on search |
" smart case policy on search |
633 |
633 |
set ignorecase |
set ignorecase |
|
... |
... |
endfunction |
974 |
974 |
" ============================================================================== |
" ============================================================================== |
975 |
975 |
" don't let me use "wrong" keys |
" don't let me use "wrong" keys |
976 |
976 |
|
|
977 |
|
imap <silent> <up> <nop> |
|
978 |
|
imap <silent> <down> <nop> |
|
979 |
|
imap <silent> <left> <nop> |
|
980 |
|
imap <silent> <right> <nop> |
|
981 |
|
imap <silent> <home> <nop> |
|
982 |
|
imap <silent> <end> <nop> |
|
983 |
|
imap <silent> <pageup> <nop> |
|
984 |
|
imap <silent> <pagedown> <nop> |
|
985 |
|
imap <silent> <c-home> <nop> |
|
986 |
|
imap <silent> <c-end> <nop> |
|
987 |
|
imap <silent> <del> <nop> |
|
988 |
|
nmap <silent> <up> <nop> |
|
989 |
|
nmap <silent> <down> <nop> |
|
990 |
|
nmap <silent> <left> <nop> |
|
991 |
|
nmap <silent> <right> <nop> |
|
992 |
|
nmap <silent> <home> <nop> |
|
993 |
|
nmap <silent> <end> <nop> |
|
994 |
|
nmap <silent> <pageup> <nop> |
|
995 |
|
nmap <silent> <pagedown> <nop> |
|
996 |
|
nmap <silent> <c-home> <nop> |
|
997 |
|
nmap <silent> <c-end> <nop> |
|
998 |
|
nmap <silent> <del> <nop> |
|
999 |
|
vmap <silent> <up> <nop> |
|
1000 |
|
vmap <silent> <down> <nop> |
|
1001 |
|
vmap <silent> <left> <nop> |
|
1002 |
|
vmap <silent> <right> <nop> |
|
1003 |
|
vmap <silent> <home> <nop> |
|
1004 |
|
vmap <silent> <end> <nop> |
|
1005 |
|
vmap <silent> <pageup> <nop> |
|
1006 |
|
vmap <silent> <pagedown> <nop> |
|
1007 |
|
vmap <silent> <c-home> <nop> |
|
1008 |
|
vmap <silent> <c-end> <nop> |
|
1009 |
|
vmap <silent> <del> <nop> |
|
|
977 |
|
inoremap <silent> <up> <nop> |
|
978 |
|
inoremap <silent> <down> <nop> |
|
979 |
|
inoremap <silent> <left> <nop> |
|
980 |
|
inoremap <silent> <right> <nop> |
|
981 |
|
inoremap <silent> <home> <nop> |
|
982 |
|
inoremap <silent> <end> <nop> |
|
983 |
|
inoremap <silent> <pageup> <nop> |
|
984 |
|
inoremap <silent> <pagedown> <nop> |
|
985 |
|
inoremap <silent> <c-home> <nop> |
|
986 |
|
inoremap <silent> <c-end> <nop> |
|
987 |
|
inoremap <silent> <del> <nop> |
|
988 |
|
nnoremap <silent> <up> <nop> |
|
989 |
|
nnoremap <silent> <down> <nop> |
|
990 |
|
nnoremap <silent> <left> <nop> |
|
991 |
|
nnoremap <silent> <right> <nop> |
|
992 |
|
nnoremap <silent> <home> <nop> |
|
993 |
|
nnoremap <silent> <end> <nop> |
|
994 |
|
nnoremap <silent> <pageup> <nop> |
|
995 |
|
nnoremap <silent> <pagedown> <nop> |
|
996 |
|
nnoremap <silent> <c-home> <nop> |
|
997 |
|
nnoremap <silent> <c-end> <nop> |
|
998 |
|
nnoremap <silent> <del> <nop> |
|
999 |
|
vnoremap <silent> <up> <nop> |
|
1000 |
|
vnoremap <silent> <down> <nop> |
|
1001 |
|
vnoremap <silent> <left> <nop> |
|
1002 |
|
vnoremap <silent> <right> <nop> |
|
1003 |
|
vnoremap <silent> <home> <nop> |
|
1004 |
|
vnoremap <silent> <end> <nop> |
|
1005 |
|
vnoremap <silent> <pageup> <nop> |
|
1006 |
|
vnoremap <silent> <pagedown> <nop> |
|
1007 |
|
vnoremap <silent> <c-home> <nop> |
|
1008 |
|
vnoremap <silent> <c-end> <nop> |
|
1009 |
|
vnoremap <silent> <del> <nop> |
1010 |
1010 |
|
|
1011 |
1011 |
" ============================================================================== |
" ============================================================================== |
1012 |
1012 |
" load machine specific local set of settings |
" load machine specific local set of settings |