Browse Source

lazygit 2022-04-03 12:33

master
Gregory Leeman 3 years ago
parent
commit
845080faa6
  1. 2
      autoload/notecrate.vim
  2. 2
      ftplugin/notecrate.vim
  3. 7
      syntax/notecrate.vim

2
autoload/notecrate.vim

@ -295,7 +295,7 @@ function! notecrate#update_backlinks() " {{{
if len(l:links) == 0 if len(l:links) == 0
let l:backlinks = l:backlinks . "* [Index](index.md)" let l:backlinks = l:backlinks . "* [Index](index.md)"
else else
let l:backlinks = l:backlinks . join(uniq(l:links), "\n") . "\n\n* [Index](index.md)" let l:backlinks = l:backlinks . join(uniq(l:links), "\n") . "\n* [Index](index.md)"
endif endif
call setreg("l", l:backlinks) call setreg("l", l:backlinks)
silent execute "normal! /^---\<CR>vG$\"lp" silent execute "normal! /^---\<CR>vG$\"lp"

2
ftplugin/notecrate.vim

@ -2,7 +2,7 @@ setlocal textwidth=79
setlocal autowriteall setlocal autowriteall
setlocal comments+=b:* setlocal comments+=b:*
setlocal foldlevel=3 setlocal foldlevel=3
setlocal formatoptions=cro " setlocal formatoptions=cro
command -nargs=1 Rename call notecrate#rename_note(<f-args>) command -nargs=1 Rename call notecrate#rename_note(<f-args>)

7
syntax/notecrate.vim

@ -2,14 +2,13 @@ setlocal foldmethod=expr
setlocal foldexpr=notecrate#nested_markdown_folds(v:lnum) setlocal foldexpr=notecrate#nested_markdown_folds(v:lnum)
setlocal foldtext=notecrate#fold_text() setlocal foldtext=notecrate#fold_text()
setlocal conceallevel=2 setlocal conceallevel=2
set comments=b:* setlocal wrap
setlocal nowrap
syn match NotecrateLinkInternal /\(\](\)\@<=[^()]*\()\)\@=/ syn match NotecrateLinkInternal /\(\](\)\@<=[^()]*\()\)\@=/
hi def link NotecrateLinkInternal orangeu hi def link NotecrateLinkInternal orangeu
syn match NotecrateBoldConceal /\*\*/ containedin=ALL " syn match NotecrateBoldConceal /\*\*/ containedin=ALL
" syn match NotecrateBoldConceal /\*\*/ conceal containedin=ALL syn match NotecrateBoldConceal /\*\*/ conceal containedin=ALL
syn match NotecrateLinkConceal /!*\[\+\([^\]]*](\)\@=/ conceal syn match NotecrateLinkConceal /!*\[\+\([^\]]*](\)\@=/ conceal
syn match NotecrateLinkConceal /\]\+\((\)\@=/ conceal syn match NotecrateLinkConceal /\]\+\((\)\@=/ conceal