-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindings.vim
63 lines (47 loc) · 1.11 KB
/
bindings.vim
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
source ~/.vim/russian_bindings.vim
source ~/.vim/functions.vim
nnoremap <esc> :noh<CR><esc>
nmap <C-h> <C-W>h
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-l> <C-W>l
nmap <F5> :!ctags -R . <Return><Return>
nmap <leader>l :set list!<CR>
noremap <A-j> gT
noremap <A-k> gt
nnoremap <space> za
nmap <silent> j gj
nmap <silent> k gk
" Tab mapping
map <leader>tt :tabnew<CR>
map <leader>te :tabedit
map <leader>tc :tabclose<CR>
map <leader>to :tabonly<CR>
vmap > >gv
vmap <Tab> >gv
vmap <S-Tab> <gv
vmap < <gv>
imap <S-Tab> <<
imap <C-Space> <C-N>
"write as root
cmap w!! w !sudo tee % >/dev/null
"latex compile
map <F2> :w<CR>:!latex -output-format=pdf %<CR><CR>
"prolog compile
noremap <Up> <nop>
noremap <Down> <nop>
noremap <Left> <nop>
noremap <Right> <nop>
noremap <Home> <nop>
noremap <End> <nop>
inoremap jj <Esc>
menu Encoding.windows-1251 :e ++enc=8bit-cp1251<CR>
menu Encoding.utf-8 :e ++enc=2byte-utf-8 <CR>
map <leader>e :emenu Encoding.<Tab>
"move line up/down
nmap <S-M-Down> ddp
nmap <S-M-Up> ddkP
"duplicate line
nmap <C-d> yyp
nmap <leader>go :call OpenInBrowser()<CR>
map <leader>k :E<cr> "exporer mode