diff --git a/autoload.vim b/autoload.vim index a84a3ab..72e91e0 100644 --- a/autoload.vim +++ b/autoload.vim @@ -1,6 +1,6 @@ " Vim auto-load script " Author: Peter Odding -" Last Change: December 24, 2010 +" Last Change: December 25, 2010 " URL: http://peterodding.com/code/vim/notes/ " Note: This file is encoded in UTF-8 including a byte order mark so @@ -414,9 +414,9 @@ function! xolox#notes#indent_list(command, line1, line2) " {{{3 normal $ endfunction -function! xolox#notes#highlight_names() " {{{3 +function! xolox#notes#highlight_names(force) " {{{3 " Highlight the names of all notes as "notesName" (linked to "Underlined"). - if !(exists('b:notes_names_last_highlighted') && b:notes_names_last_highlighted > s:cache_mtime) + if a:force || !(exists('b:notes_names_last_highlighted') && b:notes_names_last_highlighted > s:cache_mtime) let starttime = xolox#timer#start() let titles = filter(xolox#notes#get_titles(), '!empty(v:val)') call map(titles, 's:words_to_pattern(v:val)') diff --git a/notes.vim b/notes.vim index b39f689..60b7c80 100644 --- a/notes.vim +++ b/notes.vim @@ -1,9 +1,9 @@ " Vim plug-in " Author: Peter Odding -" Last Change: December 24, 2010 +" Last Change: December 25, 2010 " URL: http://peterodding.com/code/vim/notes/ " License: MIT -" Version: 0.7.15 +" Version: 0.7.16 " Support for automatic update using the GLVS plug-in. " GetLatestVimScripts: 3375 1 :AutoInstall: session.zip @@ -59,7 +59,7 @@ augroup PluginNotes " to notes (which is IMHO better than always showing the E325 prompt). au BufReadCmd note:* nested call xolox#notes#shortcut() au SwapExists * call xolox#notes#swaphack() - au WinEnter * if &ft == 'notes' | call xolox#notes#highlight_names() | endif + au WinEnter * if &ft == 'notes' | call xolox#notes#highlight_names(0) | endif au BufReadPost * if &ft == 'notes' | unlet! b:notes_names_last_highlighted | endif au BufUnload * if &ft == 'notes' | call xolox#notes#unload_from_cache() | endif call s:DefAutoCmd('BufWritePost', g:notes_directory, 'call xolox#notes#cleanup()') diff --git a/syntax.vim b/syntax.vim index 777fb4c..397b2dd 100644 --- a/syntax.vim +++ b/syntax.vim @@ -1,6 +1,6 @@ " Vim syntax script " Author: Peter Odding -" Last Change: December 24, 2010 +" Last Change: December 25, 2010 " URL: http://peterodding.com/code/vim/notes/ " Note: This file is encoded in UTF-8 including a byte order mark so @@ -23,7 +23,7 @@ syntax cluster notesInline contains=notesName highlight def link notesHiddenMarker Ignore " Highlight note names as hyperlinks. {{{2 -call xolox#notes#highlight_names() +call xolox#notes#highlight_names(1) syntax cluster notesInline add=notesName highlight def link notesName Underlined