nvim: Add longer yank highlight, standard toc map

Made yank highlight last 0.5s instead of 0.15s.

Moved mapping to display toc for markdown and pandoc files to the vim
standard mapping of gO (by default only enabled for :Man and :help).
Uses :WikiFzfToc, so will only work with wiki.vim
This commit is contained in:
Marty Oehme 2020-07-23 12:23:15 +02:00
parent f8371f0e73
commit 5640194504
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
2 changed files with 11 additions and 4 deletions

View file

@ -194,7 +194,11 @@ nnoremap <leader>wF :execute(":call SearchNotes()")<cr>
" localleader is used when it is specific to the local file " localleader is used when it is specific to the local file
nnoremap <leader>wf :WikiFzfPages<cr> nnoremap <leader>wf :WikiFzfPages<cr>
nnoremap <leader>l :WikiFzfTags<cr> nnoremap <leader>l :WikiFzfTags<cr>
nnoremap <localleader>l :WikiFzfToc<cr> " use default TOC shortcut for viewing wikitoc if in correct filetype
augroup wikitoc
autocmd!
autocmd Filetype markdown,pandoc nnoremap <buffer> gO :WikiFzfToc<cr>
augroup END
" overwrites some default mappings I don't use, or that interfere with my own " 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 " mappings TODO: currently this just assigns bogus shortcuts, since the plugin grumbles
@ -210,7 +214,10 @@ let g:wiki_mappings_local = {
\ '<plug>(wiki-graph-out)' : '<leader>wG', \ '<plug>(wiki-graph-out)' : '<leader>wG',
\} \}
" additional zettelkasten mapping " additional zettelkasten mapping
au Filetype markdown,pandoc nnoremap <cr> :ZettelOpenAtCursor<cr> augroup zettelkasten
autocmd!
autocmd Filetype markdown,pandoc nnoremap <cr> :ZettelOpenAtCursor<cr>
augroup END
" Mostly dealing with Prose writing from here on out " Mostly dealing with Prose writing from here on out
" Format current Paragraph (esp useful in prose writing) " Format current Paragraph (esp useful in prose writing)

View file

@ -1,5 +1,5 @@
" will highlight any text which has been yanked " will highlight any text which has been yanked
augroup LuaHighlight augroup LuaHighlightYank
autocmd! autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank() autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank{timeout=500}
augroup END augroup END