2020-10-09 22:55:04 +00:00
|
|
|
" set the following environment variables:
|
|
|
|
" $RC_DIR $VIM_DIR $WRYNVIMRC $BASHRC $ZSHRC $WEBBROWSER
|
2020-01-08 19:40:53 +00:00
|
|
|
source $HOME/.wryn/env/env.vim
|
2019-06-07 22:13:06 +00:00
|
|
|
|
2020-09-10 19:38:42 +00:00
|
|
|
if isdirectory(expand("$HOME/.vim/bundle/Vundle.vim"))
|
|
|
|
source $VIM_DIR/vundle.vim
|
|
|
|
endif
|
2019-08-06 20:41:27 +00:00
|
|
|
|
2019-09-26 22:00:03 +00:00
|
|
|
source $VIM_DIR/global_sets.vim
|
2020-10-09 22:55:04 +00:00
|
|
|
source $VIM_DIR/formatting.vim
|
2019-09-26 22:00:03 +00:00
|
|
|
source $VIM_DIR/abbreviations.vim
|
2020-10-09 22:55:04 +00:00
|
|
|
source $VIM_DIR/navigation.vim
|
|
|
|
source $VIM_DIR/color.vim
|
|
|
|
|
|
|
|
let mapleader = "\\"
|
|
|
|
"let localmapleader = ','
|
2019-09-06 17:54:42 +00:00
|
|
|
|
2020-10-09 22:55:04 +00:00
|
|
|
augroup personal_bindings
|
2020-09-22 04:54:55 +00:00
|
|
|
" {{{
|
2020-10-09 22:55:04 +00:00
|
|
|
|
2020-09-22 04:54:55 +00:00
|
|
|
" <SPACE> to execute macro on q
|
|
|
|
nnoremap <Space> @q
|
2020-10-09 22:55:04 +00:00
|
|
|
|
2020-09-22 04:54:55 +00:00
|
|
|
" Q to replace current line/selection with bash execution
|
|
|
|
vnoremap Q !$SHELL<CR>
|
|
|
|
nnoremap Q !!$SHELL<CR>
|
|
|
|
|
|
|
|
" \q for `q:`
|
|
|
|
nnoremap <Leader>q q:
|
2020-10-09 22:55:04 +00:00
|
|
|
|
|
|
|
" \s previous selection command
|
|
|
|
nnoremap <Leader>s :'<,'>
|
|
|
|
|
2020-09-22 04:54:55 +00:00
|
|
|
" \f for fold
|
|
|
|
nnoremap <Leader>f z
|
|
|
|
nnoremap <Leader>f z
|
2020-10-09 22:55:04 +00:00
|
|
|
|
|
|
|
" \j for J, but append current line to the line below
|
2020-09-22 04:54:55 +00:00
|
|
|
nnoremap <Leader>j ddpkJ
|
|
|
|
|
2020-10-09 22:55:04 +00:00
|
|
|
" move the current line one below where it is
|
2020-09-22 04:54:55 +00:00
|
|
|
nnoremap - :m +1 <CR>
|
|
|
|
nnoremap _ :m -2 <CR>
|
2020-10-09 22:55:04 +00:00
|
|
|
|
|
|
|
" \t for rerun last 'test' command:
|
|
|
|
nnoremap <Leader>t q:?test<CR><CR>
|
|
|
|
|
|
|
|
" \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>
|
|
|
|
|
|
|
|
" \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>da :let @d = system("date '+%A, %B %-d, %Y'")<CR>a <C-r>d<BS><esc>
|
|
|
|
|
|
|
|
" - toggle casing for current word
|
|
|
|
inoremap <C-u> <esc>viw~ea
|
|
|
|
|
|
|
|
" \c \v to copy/paste from xclip
|
|
|
|
" @TODO: learn how to freaking compile vim with x11 compatibility so these
|
|
|
|
" aren't necessary :)
|
|
|
|
vnoremap <Leader>c :w !xclip<CR><CR>
|
|
|
|
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
|
|
|
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
|
|
|
|
|
|
|
" ------- available / rarely used bindings -------
|
|
|
|
|
|
|
|
" nnoremap <BS>
|
|
|
|
" nnoremap <C-t>
|
|
|
|
" nnoremap <C-b>
|
|
|
|
" nnoremap z
|
|
|
|
" nnoremap ^
|
2020-09-22 04:54:55 +00:00
|
|
|
" }}}
|
|
|
|
augroup end
|