Browse Source

Tidy up, add in tag search.

tag-support
Michael Welford 8 months ago
parent
commit
430424248c
  1. 2
      autoload/neuron.vim
  2. 3
      doc/neuron.vim.txt
  3. 2
      plugin/neuron.vim

2
autoload/neuron.vim

@ -477,7 +477,7 @@ func! neuron#tags_position()
call setpos('.', [l:curpos[0], l:line_end_matter, 1])
let l:line_tags = search('\v\c^'.g:neuron_tags_name.':', 'bW')
if !l:line_tags
if !l:line_tags
"no tags key
call setpos('.', l:curpos)

3
doc/neuron.vim.txt

@ -92,7 +92,8 @@ MAPPINGS *neuron.vim-mappings*
nm gzI :<C-U>call neuron#insert_zettel_select(1)<cr>
nm gzv <Plug>ToggleBacklinks
nm gzt <Plug>TagsAddNew
nm gzT <Plug>TagsAddSelect
nm gzT <Plug>TagsAddSelect
nm gzts <Plug>TagsZettelSearch
ABOUT *neuron.vim-about*

2
plugin/neuron.vim

@ -37,6 +37,7 @@ nm <silent> <Plug>InsertZettelSelect :<C-U>call neuron#insert_zettel_select(0)<c
nm <silent> <Plug>ToggleBacklinks :<C-U>call neuron#toggle_backlinks()<cr>
nm <silent> <Plug>TagsAddNew :<C-U>call neuron#tags_add_new()<cr>
nm <silent> <Plug>TagsAddSelect :<C-U>call neuron#tags_add_select()<cr>
nm <silent> <Plug>TagsZettelSearch :<C-U>call neuron#tags_search()<cr>
if !exists("g:neuron_no_mappings") || ! g:neuron_no_mappings
nm gzn <Plug>EditZettelNew
@ -58,6 +59,7 @@ if !exists("g:neuron_no_mappings") || ! g:neuron_no_mappings
nm gzv <Plug>ToggleBacklinks
nm gzt <Plug>TagsAddNew
nm gzT <Plug>TagsAddSelect
nm gzts <Plug>TagsZettelSearch
end
" refresh the cache now if we are in a zettelkasten dir

Loading…
Cancel
Save