Move filetype mappings to localleader

Anything prose oriented, markdown oriented, academic publishing oriented
now lives under the localleader (, atm).

Fixes #62
This commit is contained in:
Marty Oehme 2019-11-21 18:09:11 +01:00
parent 1b12ca0d13
commit 0963825c61

View file

@ -165,10 +165,10 @@ nnoremap <leader>wf :execute(":call SearchNotes()")<cr>
" vim-go mappings - will only activate in go files
" most of this credit to https://hackernoon.com/my-neovim-setup-for-go-7f7b6e805876
" switch between test file and function
au Filetype go nnoremap <leader>ga <Plug>(go-alternate-edit)
au Filetype go nnoremap <localleader>ga <Plug>(go-alternate-edit)
" switch between test file and function - in a horizontal/vertical split
au Filetype go nnoremap <leader>gah <Plug>(go-alternate-split)
au Filetype go nnoremap <leader>gav <Plug>(go-alternate-vertical)
au Filetype go nnoremap <localleader>gah <Plug>(go-alternate-split)
au Filetype go nnoremap <localleader>gav <Plug>(go-alternate-vertical)
" run a test (but run it as short version, in case tests are tagged
" accordingly)
au FileType go nnoremap <F10> :GoTest -short<cr>
@ -182,7 +182,7 @@ au FileType go nnoremap <F12> <Plug>(go-def)
" PLUGIN: wiki.vim
" use wiki.vim to look through document outlines in fzf (only for note
" directory atm)
nnoremap <leader>l :WikiFzfToc<cr>
nnoremap <localleader>l :WikiFzfToc<cr>
" overwrites some default mappings I don't use, or that interfere with my own
" mappings TODO: currently this just assigns bogus shortcuts, since the plugin grumbles
" when setting to an empty string
@ -205,9 +205,9 @@ let g:wiki_mappings_global = {
" Mostly dealing with Prose writing from here on out
" Format current Paragraph (esp useful in prose writing)
nnoremap <silent> <leader>q gqap
xnoremap <silent> <leader>q gq
nnoremap <silent> <leader>Q vapJgqap
nnoremap <silent> <localleader>q gqap
xnoremap <silent> <localleader>q gq
nnoremap <silent> <localleader>Q vapJgqap
" PLUGIN: GOYO
" Enter distraction free prose mode with F11
@ -221,6 +221,6 @@ inoremap <silent> @@ <c-g>u<c-o>:call fzf#run(fzf#wrap({
\ 'up': '25%',
\ 'options': '--ansi --multi --prompt "Cite> "'}))<CR>
" map <leader>cc to insert a complete citation at cursor
nnoremap <silent> <leader>cc :CiteRef<cr>
nnoremap <silent> <localleader>cc :CiteRef<cr>
" map <leader>cm to insert markdown prettified citation
nnoremap <silent> <leader>cm :CiteMarkdown<cr>
nnoremap <silent> <localleader>cm :CiteMarkdown<cr>