2024-05-07 22:38:40 +00:00
|
|
|
if empty($DOTWRYN)
|
|
|
|
let $DOTWRYN=expand("$HOME/.wryn")
|
2020-09-10 19:38:42 +00:00
|
|
|
endif
|
2019-08-06 20:41:27 +00:00
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
let $VIMRC=expand("$DOTWRYN/vim/rc.vim")
|
|
|
|
for vimrcfile in split(trim(system("find " . expand("$DOTWRYN/vim/rc.d") . " -type f | sort -u")), '\n')
|
|
|
|
execute 'source ' . vimrcfile
|
|
|
|
endfor
|
2023-11-13 23:35:35 +00:00
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
" -------------------------------------------------------------------
|
|
|
|
" --- generic bindings (easy reference) -----------------------------
|
|
|
|
" -------------------------------------------------------------------
|
2021-02-25 00:38:02 +00:00
|
|
|
|
|
|
|
" <SPACE> to execute macro on q
|
|
|
|
nnoremap <Space> @q
|
|
|
|
|
|
|
|
" \q for `q:`
|
|
|
|
nnoremap <Leader>q q:
|
|
|
|
|
|
|
|
" \s previous selection command
|
|
|
|
nnoremap <Leader>s :'<,'>
|
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
" Q to replace current line(s) with shell execution
|
2022-08-09 23:56:06 +00:00
|
|
|
vnoremap Q !$SHELL<CR>
|
|
|
|
nnoremap Q !!$SHELL<CR>
|
2021-02-25 00:38:02 +00:00
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
" \j like J, but append current line to the line below
|
|
|
|
nnoremap <Leader>j ddpkJ
|
|
|
|
|
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
|
|
|
" \d insert formatted date below
|
|
|
|
nnoremap <Leader>d :let @d = system("date '+%A, %B %-d, %Y'")<CR>o<C-r>d<BS> <esc>
|
|
|
|
|
2024-05-07 22:38:40 +00:00
|
|
|
" \m to set buffer to modifiable
|
|
|
|
nnoremap <Leader>m :set modifiable<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>
|
|
|
|
|
2024-05-07 22:38:40 +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 ^
|