summaryrefslogtreecommitdiff
path: root/plugin/maps.vim
blob: e4715423b7cb51ce4edf167ccde782360a62ff1b (plain)
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
mapclear

let mapleader=' '

" clipboard
map <leader>cc :w !xclip -sel c<CR>

" normal
nnoremap <Leader>o : only<cr>
nnoremap <Leader>b : Buffers<cr>
nnoremap <Leader>n : bnext<cr>
nnoremap <Leader>p : bprev<cr>
nnoremap <Leader>z : FZF<cr>
nnoremap <Leader>l : Lines<cr>
nnoremap <Leader>t : call GetTabber()<cr>
nnoremap <Leader><ESC> : nohlsearch<cr>
nnoremap <C-l> :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
nnoremap H H:exec 'norm! '. &scrolloff . 'k'<cr>
nnoremap L L:exec 'norm! '. &scrolloff . 'j'<cr>
nnoremap <expr> gb '`[' . strpart(getregtype(), 0, 1) . '`]'


nnoremap <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
            \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
            \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

cmap w!! %!sudo -S tee > /dev/null %

" visual
vnoremap > >gv
vnoremap < <gv

" operator-pending
onoremap ax a`
onoremap ix i`

" visual block
xnoremap + g<C-a>
xnoremap - g<C-x>

" completions
inoremap <expr> <Tab>   pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"