Vimwiki enhancements

This commit is contained in:
Noah Masur
2021-04-20 17:24:35 -04:00
parent fc3465d30d
commit 449d4ec673
5 changed files with 144 additions and 8 deletions

View File

@ -3,6 +3,7 @@
command! Vimrc edit $MYVIMRC " Edit .vimrc (this file)
command! Refresh source $MYVIMRC " Refresh from .vimrc (this file)
command! Today exe 'edit ~/notes/journal/'.strftime("%Y-%m-%d_%a").'.md'
" Custom Keybinds
"----------------
@ -16,6 +17,14 @@ nnoremap <silent> <CR> :noh<CR><CR>
" Replace all
nnoremap <Leader>S :%s//g<Left><Left>
" Shuffle lines around
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
" Jump to text in this directory
nnoremap <Leader>/ :Rg<CR>
@ -62,6 +71,9 @@ nnoremap <Leader>` :GitGutterToggle<cr>
" Git push
nnoremap <Leader>gp :Git push<cr>
" Git repo
nnoremap <silent> <Leader>gr :!gh repo view -w<cr><cr>
" Split window
nnoremap <Leader>ws :vsplit<cr>

View File

@ -16,3 +16,4 @@ let g:vimwiki_key_mappings =
\ }
let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open
let g:vimwiki_create_link = 0 " Don't automatically create new links
let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression