"{{{1 Защита от множественных загрузок
if exists("b:dollarHOMEslashdotvimrcFileLoaded")
finish
endif
let b:dollarHOMEslashdotvimrcFileLoaded=1
" set t_Co=8
" set t_Sf=[3%p1%dm
" set t_Sb=[4%p1%dm
"{{{1 Options
"{{{2 set
set nocompatible
set background=dark
set display+=lastline
"set iminsert=0
"set imsearch=0
set grepprg=grep\ -nH\ $*
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set backspace=indent,eol,start
set autoindent
set nosmartindent
set backup
set conskey
set bioskey
set browsedir=buffer
" bomb may work bad
set nobomb
exe "set backupdir=".$HOME."/.vimbackup,."
set backupext=~
set history=32
set ruler
set showcmd
set hlsearch
set incsearch
set nocindent
set textwidth=80
set complete=.,i,d,t,w,b,u,k
" set conskey
set noconfirm
set cscopetag
set cscopetagorder=1
" set copyindent
" !may be not safe
set exrc
set secure
" set foldclose
set noswapfile
" set swapsync=sync
set fsync
set guicursor="a:block-blinkoff0"
set autowriteall
set hidden
set nojoinspaces
set nostartofline
" set virtualedit+=onemore
set lazyredraw
set visualbell
set makeef=make.##.err.log
set modelines=16
set more
set virtualedit+=block
set winaltkeys=no
set fileencodings=utf-8,cp1251,koi8-r,default
set encoding=utf-8
set list
set listchars=tab:>-,trail:-,nbsp:_
set magic
set pastetoggle=<F1>
set foldmethod=marker
set wildmenu
set wildcharm=<Tab>
set formatoptions=arcoqn12w
"set formatoptions+=t
set scrolloff=2
"{{{3 define keys
"{{{4 get keys from zkbd
if isdirectory($HOME."/.zkbd") &&
\filereadable($HOME."/.zkbd/".$TERM."-pc-linux-gnu")
let s:keys=split(system("cat ".
\shellescape($HOME."/.zkbd/".$TERM."-pc-linux-gnu").
\" | grep \"^key\\\\[\" | ".
\"sed -re \"s/^key\\\\[([[:alnum:]]*)\\\\]='(.*)'\\$".
\"/\\\\1=\\\\2/g\""), "\\n")
for key in s:keys
let tmp=split(key, "=")
if tmp[0]=~"^F\\d\\+$"
execute "set <".tmp[0].">=".
\substitute(tmp[1], "\\^\\[", "\<ESC>", "g")
endif
endfor
endif
" function g:DefineKeys()
"{{{4 screen
if 0 && $_SECONDLAUNCH
set <F1>=[11~
set <F2>=[12~
set <F3>=[13~
set <F4>=[14~
set <F5>=[15~
set <F6>=[17~
set <F7>=[18~
set <F8>=[19~
set <F9>=[20~
set <F10>=[21~
set <F11>=[23~
set <F12>=[24~
set <S-F1>=[23~
set <S-F2>=[24~
set <S-F3>=[25~
set <S-F4>=[26~
set <S-F5>=[28~
set <S-F6>=[29~
set <S-F7>=[31~
set <S-F8>=[32~
set <S-F9>=[33~
set <S-F10>=[34~
set <S-F11>=[23$
set <S-F12>=[24$
set <HOME>=[7~
set <END>=[8~
"{{{4 xterm
elseif $TERM=="xterm"
set <M-a>=a
set <M-b>=b
set <M-c>=c
set <M-d>=d
set <M-e>=e
set <M-f>=f
set <M-g>=g
set <M-h>=h
set <M-i>=i
set <M-j>=j
set <M-k>=k
set <M-l>=l
set <M-m>=m
set <M-n>=n
set <M-o>=o
set <M-p>=p
set <M-q>=q
set <M-r>=r
set <M-s>=s
set <M-t>=t
set <M-u>=u
set <M-v>=v
set <M-w>=w
set <M-x>=x
set <M-y>=y
set <M-z>=z
"set <M-SPACE>=
"set <Left>=OD
"set <S-Left>=O2D
"set <C-Left>=O5D
"set <Right>=OC
"set <S-Right>=O2C
"set <C-Right>=O5C
"set <Up>=OA
"set <S-Up>=O2A
"set <C-Up>=O5A
"set <Down>=OB
"set <S-Down>=O2B
"set <C-Down>=O5B
set <F1>=[11~
set <F2>=[12~
set <F3>=[13~
set <F4>=[14~
set <F5>=[15~
set <F6>=[17~
set <F7>=[18~
set <F8>=[19~
set <F9>=[20~
set <F10>=[21~
set <F11>=[23~
set <F12>=[24~
"set <C-F1>=
"set <C-F2>=
"set <C-F3>=
"set <C-F4>=
"set <C-F5>=[15;5~
"set <C-F6>=[17;5~
"
"set <C-F7>=[18;5~
"set <C-F8>=[19;5~
"set <C-F9>=[20;5~
"set <C-F10>=[21;5~
"set <C-F11>=[23;5~
"set <C-F12>=[24;5~
set <S-F1>=[11;2~
set <S-F2>=[12;2~
set <S-F3>=[13;2~
set <S-F4>=[14;2~
set <S-F5>=[15;2~
set <S-F6>=[17;2~
set <S-F7>=[18;2~
set <S-F8>=[19;2~
set <S-F9>=[20;2~
set <S-F10>=[21;2~
set <S-F11>=[23;2~
set <S-F12>=[24;2~
set <END>=OF
set <S-END>=O2F
set <S-HOME>=O2H
set <HOME>=OH
set <DEL>=
" set <PageUp>=[5~
" set <PageDown>=[6~
" noremap <DEL>
" inoremap <DEL>
" cnoremap <DEL>
set <S-Del>=[3;2~
" set <C-Del>=[3;5~
" set <M-Del>=[3;3~
"{{{4 rxvt --- aterm
elseif $TERM=="rxvt"
set <M-a>=a
set <M-b>=b
set <M-c>=c
set <M-d>=d
set <M-e>=e
set <M-f>=f
set <M-g>=g
set <M-h>=h
set <M-i>=i
set <M-j>=j
set <M-k>=k
set <M-l>=l
set <M-m>=m
set <M-n>=n
set <M-o>=o
set <M-p>=p
set <M-q>=q
set <M-r>=r
set <M-s>=s
set <M-t>=t
set <M-u>=u
set <M-v>=v
set <M-w>=w
set <M-x>=x
set <M-y>=y
set <M-z>=z
set <F1>=OP
set <F2>=OQ
set <F3>=OR
set <F4>=OS
set <F5>=[15~
set <F6>=[17~
set <F7>=[18~
set <F8>=[19~
set <F9>=[20~
set <F10>=[21~
set <F11>=[23~
set <F12>=[24~
set <S-F1>=[23~
set <S-F2>=[24~
set <S-F3>=[25~
set <S-F4>=[26~
set <S-F5>=[28~
set <S-F6>=[29~
set <S-F7>=[31~
set <S-F8>=[32~
set <S-F9>=[33~
set <S-F10>=[34~
set <S-F11>=[23$
set <S-F12>=[24$
" set <C-S-F2>=[24^
" set <C-S-F3>=[25^
" set <C-S-F4>=[26^
" set <C-S-F5>=[28^
" set <C-S-F6>=[29^
" set <C-S-F7>=[31^
" set <C-S-F8>=[32^
" set <C-S-F9>=[33^
" set <C-S-F10>=[34^
" set <C-S-F11>=[23@
" set <C-S-F12>=[24@
" set <M-F5>=<F5>
" set <M-F6>=<F6>
" set <M-F7>=<F7>
" set <M-F8>=<F8>
" set <M-F9>=<F9>
" set <M-F10>=<F10>
" set <M-F11>=<F11>
" set <M-F12>=<F12>
" set <M-S-F5>=<S-F5>
" set <M-S-F6>=<S-F6>
" set <M-S-F7>=<S-F7>
" set <M-S-F8>=<S-F8>
" set <M-S-F9>=<S-F9>
" set <M-S-F10>=<S-F10>
" set <M-S-F11>=<S-F11>
" set <M-S-F12>=<S-F12>
"{{{4 rxvt-unicode --- urxvt
elseif $TERM=="rxvt-unicode"
set <M-a>=a
set <M-b>=b
set <M-c>=c
set <M-d>=d
set <M-e>=e
set <M-f>=f
set <M-g>=g
set <M-h>=h
set <M-i>=i
set <M-j>=j
set <M-k>=k
set <M-l>=l
set <M-m>=m
set <M-n>=n
set <M-o>=o
set <M-p>=p
set <M-q>=q
set <M-r>=r
set <M-s>=s
set <M-t>=t
set <M-u>=u
set <M-v>=v
set <M-w>=w
set <M-x>=x
set <M-y>=y
set <M-z>=z
set <F1>=[11~
set <F2>=[12~
set <F3>=[13~
set <F4>=[14~
set <F5>=[15~
set <F6>=[17~
set <F7>=[18~
set <F8>=[19~
set <F9>=[20~
set <F10>=[21~
set <F11>=[23~
set <F12>=[24~
" fluxbox!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set <S-F1>=[23~
set <S-F2>=[24~
set <S-F3>=[25~
set <S-F4>=[26~
set <S-F5>=[28~
set <S-F6>=[29~
set <S-F7>=[31~
set <S-F8>=[32~
set <S-F9>=[33~
set <S-F10>=[34~
set <S-F11>=[23$
set <S-F12>=[24$
" set <C-F1>=[11^
" set <C-F2>=[12^
" set <C-F3>=[13^
" set <C-F4>=[14^
" set <C-F5>=[15^
" set <C-F6>=[17^
" set <C-F7>=[18^
" set <C-F8>=[19^
" set <C-F9>=[20^
" set <C-F10>=[21^
" set <C-F11>=[23^
" set <C-F12>=[24^
" openbox!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
" set <S-F1>=[23~
" set <S-F2>=[24~
" set <S-F3>=[25~
" set <S-F4>=[26~
" set <S-F5>=[28~
" set <S-F6>=[29~
" set <S-F7>=[31~
" set <S-F8>=[32~
" set <S-F9>=[33~
" set <S-F10>=[34~
" set <S-F11>=[23$
" set <S-F12>=[24$
" set <C-S-F2>=[24^
" set <C-S-F3>=[25^
" set <C-S-F4>=[26^
" set <C-S-F5>=[28^
" set <C-S-F6>=[29^
" set <C-S-F7>=[31^
" set <C-S-F8>=[32^
" set <C-S-F9>=[33^
" set <C-S-F10>=[34^
" set <C-S-F11>=[23@
" set <C-S-F12>=[24@
" set <M-F5>=<F5>
" set <M-F6>=<F6>
" set <M-F7>=<F7>
" set <M-F8>=<F8>
" set <M-F9>=<F9>
" set <M-F10>=<F10>
" set <M-F11>=<F11>
" set <M-F12>=<F12>
" set <M-S-F5>=<S-F5>
" set <M-S-F6>=<S-F6>
" set <M-S-F7>=<S-F7>
" set <M-S-F8>=<S-F8>
" set <M-S-F9>=<S-F9>
" set <M-S-F10>=<S-F10>
" set <M-S-F11>=<S-F11>
" set <M-S-F12>=<S-F12>
endif
" autocmd! DefineKeys
" endfunction
" "{{{4 autocmd
" augroup DefineKeys
" autocmd BufEnter * call g:DefineKeys()
" augroup END
"{{{2 filetipe
filetype plugin indent on
syntax on
"{{{2 let
"{{{ NERDCommenter
let NERDShutUp=1
let NERDSpaceDelims=1
"}}}
let g:c_syntax_for_h=1
let g:xml_syntax_folding=1
let paste_mode=0 " 0 = normal, 1 = paste
"{{{3 keys if $TERM=="rxvt-unicode"
" " fluxbox!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
" let g:C_F1="\<ESC>[11^"
" let g:C_F2="\<ESC>[12^"
" let g:C_F3="\<ESC>[13^"
" let g:C_F4="\<ESC>[14^"
" let g:C_F5="\<ESC>[15^"
" let g:C_F6="\<ESC>[17^"
" let g:C_F7="\<ESC>[18^"
" let g:C_F8="\<ESC>[19^"
" let g:C_F9="\<ESC>[20^"
" let g:C_F10="\<ESC>[21^"
" let g:C_F11="\<ESC>[23^"
" let g:C_F12="\<ESC>[24^"
" let g:M_S_F1="\<ESC>\<ESC>[23$"
" let g:M_S_F2="\<ESC>\<ESC>[24$"
" let g:M_S_F3="\<ESC>\<ESC>[25$"
" let g:M_S_F4="\<ESC>\<ESC>[26$"
" let g:M_S_F5="\<ESC>\<ESC>[28$"
" let g:M_S_F6="\<ESC>\<ESC>[29$"
" let g:M_S_F7="\<ESC>\<ESC>[31$"
" let g:M_S_F8="\<ESC>\<ESC>[32$"
" let g:M_S_F9="\<ESC>\<ESC>[33$"
" let g:M_S_F10="\<ESC>\<ESC>[34$"
" let g:M_S_F11="\<ESC>\<ESC>[23$"
" let g:M_S_F12="\<ESC>\<ESC>[24$"
" let g:M_C_F1="\<ESC>\<ESC>[11^"
" let g:M_C_F2="\<ESC>\<ESC>[12^"
" let g:M_C_F3="\<ESC>\<ESC>[13^"
" let g:M_C_F4="\<ESC>\<ESC>[14^"
" let g:M_C_F5="\<ESC>\<ESC>[15^"
" let g:M_C_F6="\<ESC>\<ESC>[17^"
" let g:M_C_F7="\<ESC>\<ESC>[18^"
" let g:M_C_F8="\<ESC>\<ESC>[19^"
" let g:M_C_F9="\<ESC>\<ESC>[20^"
" let g:M_C_F10="\<ESC>\<ESC>[21^"
" let g:M_C_F11="\<ESC>\<ESC>[23^"
" let g:M_C_F12="\<ESC>\<ESC>[24^"
" endif
"{{{3 Настройки :TOhtml
let html_number_lines=1
" let html_ignore_folding=1
let html_use_css=1
let html_no_pre=0
let use_xhtml=1
"{{{3 Предотвратить загрузку
let loaded_cmdalias=0
"{{{3 Mine
" let g:kmaps={"en": "", "ru": "russian-dvp"}
"{{{1 Syntax
highlight TooLongLine term=reverse ctermfg=Yellow ctermbg=Red
2match TooLongLine /\S\%>81v/
"{{{1 Autocommands
autocmd VimLeavePre * silent mksession! ~/.vim/lastSession.vim
au BufWritePost * if getline(1) =~ "^#!" | execute "silent! !chmod a+x %" |
\endif
autocmd BufRead,BufWinEnter * let &l:modifiable=(!(&ro && !&bt=="quickfix"))
"{{{1 Digraphs
digraphs ca 94 "^
digraphs ga 96 "`
digraphs ti 126 "~
"{{{1 Menus
" menu Encoding.koi8-r :e ++enc=8bit-koi8-r<CR>
" menu Encoding.windows-1251 :e ++enc=8bit-cp1251<CR>
" menu Encoding.ibm-866 :e ++enc=8bit-ibm866<CR>
" menu Encoding.utf-8 :e ++enc=2byte-utf-8<CR>
" menu Encoding.ucs-2le :e ++enc=ucs-2le<CR>
"{{{1 Команды
function s:Substitute(sstring, line1, line2)
execute a:line1.",".a:line2."!perl -pi -e 'use encoding \"utf8\"; s'".
\escape(shellescape(a:sstring), '%!').
\" 2>/dev/null"
endfunction
command -range=% -nargs=+ S call s:Substitute(<q-args>, <line1>, <line2>)
"{{{1 Mappings
"{{{2 Menu mappings
"{{{2 function mappings
"
"{{{3 Function Eatchar
function Eatchar(pat)
let l:pat=((a:pat=="")?("*"):(a:pat))
let c = nr2char(getchar(0))
return (c =~ l:pat) ? '' : c
endfunction
"{{{3 CleverTab - tab to autocomplete and move indent
function CleverTab()
if strpart( getline('.'), col('.')-2, 1) =~ '^\k$'
return "\<C-n>"
else
return "\<Tab>"
endif
endfunction
inoremap <Tab> <C-R>=CleverTab()<CR>
"{{{3 Keymap switch
function! SwitchKeymap(kmaps, knum)
let s:kmapvals=values(a:kmaps)
if a:knum=="+"
let s:ki=index(s:kmapvals, &keymap)
echo s:ki
if s:ki==-1
let &keymap=s:kmapvals[0]
return
elseif s:ki>=len(a:kmaps)-1
let &keymap=s:kmapvals[0]
return
endif
let &keymap=s:kmapvals[s:ki+1]
return
elseif has_key(a:kmaps, a:knum)
let &keymap=a:kmaps[a:knum]
return
endif
let s:ki=0
for val in s:kmapvals
if s:ki==a:knum
let &keymap=val
return
endif
let s:ki+=1
endfor
let &keymap=s:kmapvals[0]
endfunction
" inoremap <S-Tab> <C-\><C-o>:call<SPACE>SwitchKeymap(g:kmaps,<SPACE>"+")<C-m>
"{{{2 ToggleVerbose
function! ToggleVerbose()
let g:verboseflag = !g:verboseflag
if g:verboseflag
exe "set verbosefile=".$HOME."/.logs/vim/verbose.log
set verbose=15
else
set verbose=0
set verbosefile=
endif
endfunction
noremap <F4>sv :call<SPACE>ToggleVerbose()
inoremap <F4>sv <C-o>:call<SPACE>ToggleVerbose()
"{{{2 Other mappings
"{{{3 <.*F12> mappings - for some browsing
noremap <F12> :TlistToggle<CR>
inoremap <F12> <C-O>:TlistToggle<CR>
inoremap <S-F12> <C-O>:BufExplorer<CR>
noremap <S-F12> :BufExplorer<CR>
inoremap <M-F12> <C-O>:NERDTreeToggle<CR>
noremap <M-F12> :NERDTreeToggle<CR>
"{{{3 yank/paste
vnoremap <C-Insert> "+y
nnoremap <S-Insert> "+p
inoremap <S-Insert> <C-o><S-Insert>
vnoremap p "_da<C-r><C-r>"<CR><ESC>
"{{{3 Motions
"{{{4 Left/Right replace
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
inoremap <C-b> <C-\><C-o>h
inoremap <C-f> <C-o>a
cnoremap <M-b> <C-Right>
inoremap <M-b> <C-o>w
inoremap <M-f> <C-o>b
cnoremap <M-f> <C-Left>
"{{{4 Page Up/Down
nnoremap <C-b> <C-U><C-U>
inoremap <PageUp> <C-O><C-U><C-O><C-U>
nnoremap <C-f> <C-D><C-D>
inoremap <PageDown> <C-O><C-D><C-O><C-D>
"{{{4 Up/Down
inoremap <C-G> <C-\><C-o>gk
inoremap <Up> <C-\><C-o>gk
inoremap <Down> <C-\><C-o>gj
inoremap <C-l> <C-\><C-o>gj
nnoremap <Down> gj
vnoremap <Down> gj
nnoremap j gj
vnoremap j gj
nnoremap gj j
vnoremap gj j
nnoremap gk k
vnoremap gk k
nnoremap k gk
vnoremap k gk
nnoremap <Up> gk
vnoremap <Up> gk
"{{{4 Smart <HOME> and <END>
" imap <HOME> <C-o>g^
" imap <C-O>g^<HOME> <C-o>^
" inoremap <C-o>^<HOME> <C-o>0
" imap <END> <C-o>g$
" inoremap <C-o>g$<END> <C-o>$
" nmap <HOME> <C-o>g^
" nmap <C-O>g^<HOME> ^
" nnoremap <C-o>^<HOME> 0
" nmap <END> g$
" nnoremap <C-o>g$<END> $
"{{{3 <F3> and searching
noremap <F3> :nohl<CR>
inoremap <S-F3> <C-o>:nohl<CR>
inoremap <F3> <C-o>n
"{{{3 <F2> for saving, <F10> for exiting
noremap <F2> :up<CR>
inoremap <F2> <C-o>:up<CR>
inoremap <F10> <ESC>ZZ
noremap <F10> <ESC>ZZ
inoremap <S-F10> <ESC>:q!<CR>
noremap <S-F10> :q!<CR>
inoremap <C-F10> <ESC>:silent<SPACE>mksession<SPACE>session.vim<CR>:wq!
noremap <C-F10> :silent<SPACE>mksession<SPACE>session.vim<CR>:wq!
"{{{3 Something
inoremap <C-z> <C-o>u
noremap <F1> :set paste!<C-m>
inoremap <C-^> <C-O><C-^>
inoremap <C-d> <Del>
cnoremap <C-d> <Del>
"{{{3 <C-j>
inoremap <C-j>j <C-o>:bn<CR>
inoremap <C-j>J <C-o>:bN<CR>
noremap <C-j>j :bn<CR>
noremap <C-j>J :bN<CR>
"{{{3 for visual
inoremap <S-Left> <C-o>vge
inoremap <S-Up> <C-o>vk
inoremap <S-Down> <C-o>vj
inoremap <S-Right> <C-o>ve
inoremap <S-End> <C-o>v$
inoremap <S-Home> <C-o>v$o^
vnoremap A <C-c>i
"{{{3 <F4>
"{{{4 <F4> folds
noremap <F4>{ a{{{<ESC>
inoremap <F4>{ {{{
noremap <F4>} a}}}<ESC>
inoremap <F4>} }}}
inoremap <F4>[ <C-o>o{{{<C-o>:call NERDComment(0,"norm")<C-m>
noremap <F4>[ o{{{<C-o>:call NERDComment(0,"norm")<C-m>
inoremap <F4>] <C-o>o}}}<C-o>:call NERDComment(0,"norm")<C-m>
noremap <F4>] o}}}<C-o>:call NERDComment(0,"norm")<C-m>
"{{{4 <F4> folds
inoremap <F4>f <C-o>za<C-o>j<C-o>^
noremap <F4>f zaj
"{{{4 <F4> yank/paste/delete
inoremap <F4>p <C-o>p
inoremap <F4>gp <C-o>"+p
inoremap <F4>y( <C-o>ya)
inoremap <F4>yl <C-o>yy
inoremap <F4>gy( <C-o>"+ya)
inoremap <F4>gyl <C-o>"+yy
inoremap <F4>P <C-o>P
inoremap <F4>d( <C-o>da)
inoremap <F4>dl <C-o>dd
"{{{4 <F4> frequently used expressions
inoremap <F4>c \033[m<C-/><C-o>h
"{{{4 <F4> alternate
imap <F4>a <C-o>:A<C-m>
map <F4>a :A<C-m>
"}}}
"}}}
"{{{3 «,»
"
" &lower
" &upper
" &1st
" &2nd
" &both lower and upper (or both 1st and 2nd)
" prefixed with &e
" prefixed with &E
" is &Prefix for smth
" &prefixed with (([what]p(prefix)))
" -: nothing
" +: added
" /: replaced
" [invc]: for modes insert, normal, visual, command (for insert mode if
" omitted)
" | vimrc | | | | |
" | i n v c | tex | c | html | vim | other
" ----+-----------------+--------+--------+-------+-------+---------------------
" a | l l | | | | |
" b | b - - b | +Pu | +eb+Eb | | |
" c | l b | +u | | | |
" d | b b b | | | | |
" e | Pl Pl | | +l+Pu | | |
" f | b(eb) - - b | | | | /u | zsh:+el
" g | | | | | |
" h | b(el) - - b(el) | /u | | | | sh:/u+eu
" i | l l - l | | | | |
" j | | | | | |
" k | | | | | |
" l | l | +Pu | | | | make:+u
" m | l l | /[in]m | +u | | |
" n | l | /l+u | | /l | /l |
" o | l | | | | |
" p | - - - b | +el | | | |
" q | b(eb) | +Pl | | | |
" r | | +u | | | |
" s | l(el) - - b | +u | +u | | +u+eu | make,perl,zsh:+u
" t | b(el) - - l | +eu | | | |
" u | l - - b | | | +u | +u |
" v | | | | | |
" w | b - - b | | | | |
" x | | | | | |
" y | l l l | | | | |
" z | | | | | |
" ' " | b | /b | | | |
" ; : | 1 | | | | |
" , . | b 2 - 1 | | | +e2 | |
" ? ! | | | | | |
" < > | | +b | | +b+eb | +1 |
" - _ | | +1 | | +b | |
" @ / | b | | | | |
" = | | | | | |
"
"{{{4 insert
inoremap ,<SPACE> ,<SPACE>
inoremap ,<Esc> ,
inoremap ,<BS> <Nop>
inoremap ,ef <C-o>I{<C-m><C-o>o}<C-o>O
inoremap ,eF <C-m>{<C-m><C-o>o}<C-o>O
inoremap ,F {<C-o>o}<C-o>O
inoremap ,f {}<C-\><C-o>h
inoremap ,h []<C-\><C-o>h
inoremap ,s ()<C-\><C-o>h
inoremap ,u <LT>><C-\><C-o>h
inoremap ,es (<C-\><C-o>E<C-o>a)<C-\><C-o>h
inoremap ,H [[::]]<C-o>F:
inoremap ,eh [::]<C-o>F:
inoremap ,, \
inoremap ,. <C-o>==
inoremap ,w <C-o>w
inoremap ,W <C-o>W
inoremap ,b <C-o>b
inoremap ,B <C-o>B
inoremap ,a <C-o>A
inoremap ,i <C-o>I
inoremap ,l <C-o>o
inoremap ,o <C-o>O
inoremap ,dw <C-o>"zdaw
inoremap ,p <C-o>"zp
inoremap ,P <C-o>"zP
inoremap ,yw <C-o>"zyaw
inoremap ,y <C-o>"zy
inoremap ,d <C-o>"zd
inoremap ,D <C-o>"_d
inoremap ,c <C-o>:call<SPACE>NERDComment(0,"toggle")<C-m>
inoremap ,ec <C-o>:call<SPACE>NERDComment(0,"toEOL")<C-m>
inoremap ,t <C-r>=Tr3transliterate(input("Translit: "))<C-m>
inoremap ,T <C-o>b<C-o>"tdiw<C-r><C-r>=Tr3transliterate(@t)<C-m>
inoremap ,et <C-o>B<C-o>"tdiW<C-r><C-r>=Tr3transliterate(@t)<C-m>
inoremap ,/ <C-x><C-f>
inoremap ,@ <C-o>:w!<C-m>
inoremap ,; <C-o>%
inoremap ,m <C-\><C-o>:call system("make &")<C-m>
inoremap ,n \<C-m>
inoremap ,q «»<C-\><C-o>h
inoremap ,Q „“<C-\><C-o>h
inoremap ,eq “”<C-\><C-o>h
inoremap ,eQ ‘’<C-\><C-o>h
inoremap ," ""<C-\><C-o>h
inoremap ,' ''<C-\><C-o>h
"{{{4 visual
vnoremap ,y "zy
vnoremap ,d "zd
vnoremap ,D "_d
vnoremap ,p "zp
"{{{4 command
cnoremap ,s ()<Left>
cnoremap ,S \(\)<Left><Left>
cnoremap ,U \<LT>\><Left><Left>
cnoremap ,u <LT>><Left>
cnoremap ,F \{}<Left>
cnoremap ,f {}<Left>
cnoremap ,h []<Left>
cnoremap ,H [[::]]<Left><Left><Left>
cnoremap ,eh [::]<Left><Left>
cnoremap ,i <Home>
cnoremap ,a <End>
cnoremap ,, \
cnoremap ,. <C-r>:
cnoremap ,p <C-r>"
cnoremap ,P <C-r>+
cnoremap ,z <C-r>z
cnoremap ,t <C-r>=Tr3transliterate(input("Translit: "))<C-m>
cnoremap ,b <C-Left>
cnoremap ,w <C-Right>
cnoremap ,B <C-Left>
cnoremap ,W <C-Right>
"{{{4 normal
nnoremap ,C :!
nnoremap ,c :call<SPACE>NERDComment(0,"toggle")<C-m>
nnoremap ,d "_
nnoremap ,D "_d
nnoremap ,m :call system("make &")<C-m>
nnoremap ,a $
nnoremap ,i ^
nnoremap ,, ==
nnoremap ,y "zy
nnoremap ,p "zp
nnoremap ,P "zP
"{{{1 Functions
"{{{1
nohlsearch
" vim: ft=vim:fenc=utf-8:ts=4