only load general bindings once
This commit is contained in:
parent
fec19a1dc3
commit
66aca50c97
69
vim/rc.vim
69
vim/rc.vim
@ -24,46 +24,51 @@ source $VIM_DIR/abbreviations.vim
|
|||||||
source $VIM_DIR/window_pane_navigation.vim
|
source $VIM_DIR/window_pane_navigation.vim
|
||||||
source $VIM_DIR/my_colors.vim
|
source $VIM_DIR/my_colors.vim
|
||||||
|
|
||||||
" <SPACE> to execute macro on q
|
augroup general_bindings
|
||||||
nnoremap <Space> @q
|
" {{{
|
||||||
|
" <SPACE> to execute macro on q
|
||||||
|
nnoremap <Space> @q
|
||||||
|
|
||||||
" Q to replace current line/selection with bash execution
|
" Q to replace current line/selection with bash execution
|
||||||
vnoremap Q !$SHELL<CR>
|
vnoremap Q !$SHELL<CR>
|
||||||
nnoremap Q !!$SHELL<CR>
|
nnoremap Q !!$SHELL<CR>
|
||||||
|
|
||||||
" \d to insert formatted date before/after cursor
|
" \d to insert formatted date before/after cursor
|
||||||
nnoremap <Leader>di :let @d = system("date '+%A, %B %d, %Y'")<CR>i<C-r>d<BS> <esc>
|
nnoremap <Leader>di :let @d = system("date '+%A, %B %d, %Y'")<CR>i<C-r>d<BS> <esc>
|
||||||
nnoremap <Leader>da :let @d = system("date '+%A, %B %d, %Y'")<CR>a <C-r>d<BS><esc>
|
nnoremap <Leader>da :let @d = system("date '+%A, %B %d, %Y'")<CR>a <C-r>d<BS><esc>
|
||||||
|
|
||||||
" \c \v to copy/paste from xclip
|
" \c \v to copy/paste from xclip
|
||||||
" @TODO: learn how to freaking compile vim with x11 compatibility so these
|
" @TODO: learn how to freaking compile vim with x11 compatibility so these
|
||||||
" aren't necessary :)
|
" aren't necessary :)
|
||||||
vnoremap <Leader>c :w !xclip<CR><CR>
|
vnoremap <Leader>c :w !xclip<CR><CR>
|
||||||
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
||||||
|
|
||||||
" \b for git blame
|
" \b for git blame
|
||||||
nnoremap <Leader>b :set termwinsize=15*0<BAR>:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %"<BAR>:set termwinsize&<CR>
|
nnoremap <Leader>b :set termwinsize=15*0<BAR>:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %"<BAR>:set termwinsize&<CR>
|
||||||
|
|
||||||
" \s previous selection command
|
" \s previous selection command
|
||||||
nnoremap <Leader>sq :'<,'>
|
nnoremap <Leader>sq :'<,'>
|
||||||
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
||||||
|
|
||||||
" \q for `q:`
|
" \q for `q:`
|
||||||
nnoremap <Leader>q q:
|
nnoremap <Leader>q q:
|
||||||
|
|
||||||
" \t for rerun last 'test' command:
|
" \t for rerun last 'test' command:
|
||||||
nnoremap <Leader>t q:?test<CR><CR>
|
nnoremap <Leader>t q:?test<CR><CR>
|
||||||
|
|
||||||
" \f for fold
|
" \f for fold
|
||||||
nnoremap <Leader>f z
|
nnoremap <Leader>f z
|
||||||
nnoremap <Leader>f z
|
nnoremap <Leader>f z
|
||||||
|
|
||||||
" append current line to the line below
|
" append current line to the line below
|
||||||
nnoremap <Leader>j ddpkJ
|
nnoremap <Leader>j ddpkJ
|
||||||
|
|
||||||
" - to move the current line one below where it is
|
" - to move the current line one below where it is
|
||||||
nnoremap - :m +1 <CR>
|
nnoremap - :m +1 <CR>
|
||||||
nnoremap _ :m -2 <CR>
|
nnoremap _ :m -2 <CR>
|
||||||
|
|
||||||
" - (insert mode) set current word to upper-case
|
" - (insert mode) set current word to upper-case
|
||||||
inoremap <c-u> <esc>viwUea
|
inoremap <c-u> <esc>viwUea
|
||||||
|
|
||||||
|
" }}}
|
||||||
|
augroup end
|
||||||
|
Loading…
Reference in New Issue
Block a user