Skip to content

Commit 7a721b7

Browse files
committed
Start using 'syntax sync fromstart' until we find a better way ...
See also issue #2 on GitHub: #2
1 parent 1dcfacd commit 7a721b7

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

autoload/xolox/notes.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: October 20, 2014
3+
" Last Change: November 3, 2014
44
" URL: http://peterodding.com/code/vim/notes/
55

66
" Note: This file is encoded in UTF-8 including a byte order mark so
77
" that Vim loads the script using the right encoding transparently.
88

9-
let g:xolox#notes#version = '0.28'
9+
let g:xolox#notes#version = '0.28.1'
1010
let g:xolox#notes#url_pattern = '\<\(mailto:\|javascript:\|\w\{3,}://\)\(\S*\w\)\+/\?'
1111
let s:scriptdir = expand('<sfile>:p:h')
1212

syntax/notes.vim

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim syntax script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: July 7, 2014
3+
" Last Change: November 3, 2014
44
" URL: http://peterodding.com/code/vim/notes/
55

66
" Note: This file is encoded in UTF-8 including a byte order mark so
@@ -11,6 +11,14 @@ if exists('b:current_syntax')
1111
finish
1212
endif
1313

14+
" Tell Vim to start redrawing by rescanning all previous text. This isn't
15+
" exactly optimal for performance but it enables accurate syntax highlighting.
16+
" Ideally we'd find a way to get accurate syntax highlighting without the
17+
" nasty performance implications, but for now I'll accept the performance
18+
" impact in order to have accurate highlighting. For more discussion please
19+
" refer to https://github.com/xolox/vim-notes/issues/2.
20+
syntax sync fromstart
21+
1422
" Check for spelling errors in all text.
1523
syntax spell toplevel
1624

0 commit comments

Comments
 (0)