2022-02-06 07:15:14 +00:00
|
|
|
source $HOME/.config/wryn/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"))
|
2021-02-25 00:38:02 +00:00
|
|
|
source $WRYNVIMPATH/vundle.vim
|
2020-09-10 19:38:42 +00:00
|
|
|
endif
|
2019-08-06 20:41:27 +00:00
|
|
|
|
2021-02-25 00:38:02 +00:00
|
|
|
source $WRYNVIMPATH/options.vim
|
|
|
|
source $WRYNVIMPATH/testing.vim
|
|
|
|
source $WRYNVIMPATH/formatting.vim
|
|
|
|
source $WRYNVIMPATH/navigation.vim
|
|
|
|
source $WRYNVIMPATH/color.vim
|
2022-01-03 19:46:34 +00:00
|
|
|
source $WRYNVIMPATH/utility.vim
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" ---------------------------------------------------------------------
|
|
|
|
" {{{
|
2021-02-25 00:38:02 +00:00
|
|
|
|
|
|
|
" <SPACE> to execute macro on q
|
|
|
|
nnoremap <Space> @q
|
|
|
|
|
|
|
|
" \q for `q:`
|
|
|
|
nnoremap <Leader>q q:
|
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" \f for fold
|
|
|
|
nnoremap <Leader>f z
|
|
|
|
|
2021-02-25 00:38:02 +00:00
|
|
|
" \s previous selection command
|
|
|
|
nnoremap <Leader>s :'<,'>
|
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" (e)dit / (s)ource vimrc
|
|
|
|
nnoremap <Leader>ev :tabedit $WRYNVIMRC<CR>
|
|
|
|
nnoremap <Leader>sv :source $MYVIMRC<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" Q to replace current line/selection with bash execution
|
|
|
|
vnoremap Q !$SHELL<CR>
|
|
|
|
nnoremap Q !!$SHELL<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" move the current line down/up one
|
2021-04-09 21:13:58 +00:00
|
|
|
nnoremap - :move +1 <CR>
|
|
|
|
nnoremap _ :move -2 <CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" \j like J, but append current line to the line below
|
|
|
|
nnoremap <Leader>j ddpkJ
|
|
|
|
|
|
|
|
" \d insert formatted date below
|
|
|
|
nnoremap <Leader>d :let @d = system("date '+%A, %B %-d, %Y'")<CR>o<C-r>d<BS> <esc>
|
|
|
|
|
|
|
|
" \g git fugitive shortcuts
|
|
|
|
nnoremap <Leader>gb :Git blame<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" \r = open last REPL (p)ython (n)odejs (c)lisp
|
|
|
|
nnoremap <Leader>r q:?^echom 'quickrepl'<CR><CR>
|
|
|
|
nnoremap <Leader>rp q:oechom 'quickrepl' \| call SplitPaneTest('bpython')<CR>
|
|
|
|
nnoremap <Leader>rn q:oechom 'quickrepl' \| call SplitPaneTest('node')<CR>
|
|
|
|
nnoremap <Leader>rc q:oechom 'quickrepl' \| call SplitPaneTest('clisp', 1)<CR>
|
2022-08-15 18:06:16 +00:00
|
|
|
nnoremap <Leader>rs q:oechom 'quickrepl' \| call SplitPaneTest('')<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" \t = run last quicktest
|
|
|
|
" t)ype new quicktest
|
|
|
|
" e)dit last quicktest
|
|
|
|
nnoremap <Leader>t q:?^echom 'quicktest'<CR><CR>
|
|
|
|
nnoremap <Leader>tt q:oechom 'quicktest' \| call SplitPaneTest('')<ESC>F'i
|
|
|
|
nnoremap <Leader>te q:?^echom 'quicktest'<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" ./utility.vim
|
|
|
|
nnoremap <Leader><Leader>w :call Sudowrite()<CR>
|
|
|
|
nnoremap <Leader><Leader>x :call MakeFileExecutable(0)<CR>
|
|
|
|
nnoremap <Leader><Leader>xx :call MakeFileExecutable(1)<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" (c)opy / (p)aste from xclip
|
|
|
|
" TODO: learn how to compile vim with x11 compatibility and delete
|
2021-02-25 00:38:02 +00:00
|
|
|
vnoremap <Leader>c :w !xclip<CR><CR>
|
|
|
|
nnoremap <Leader>v o<esc>!!xclip -o<CR>
|
|
|
|
nnoremap <Leader>sc :'<,'>w !xclip<CR><CR>
|
|
|
|
|
2022-08-17 18:17:00 +00:00
|
|
|
" enable/disable true color
|
|
|
|
nnoremap <f12> :set invtermguicolors<CR>
|
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" --- available / rarely used bindings (personal reference) ---
|
2021-02-25 00:38:02 +00:00
|
|
|
|
|
|
|
" nnoremap <BS>
|
|
|
|
" nnoremap <C-t>
|
|
|
|
" nnoremap <C-b>
|
|
|
|
" nnoremap z
|
|
|
|
" nnoremap ^
|
|
|
|
|
2020-09-22 04:54:55 +00:00
|
|
|
" }}}
|
2022-08-09 23:56:06 +00:00
|
|
|
" ---------------------------------------------------------------------
|