Permalink
Browse files

tags bugfixing

  • Loading branch information...
1 parent f0c686f commit 3576fefd4e259975badeb1e0ed6a31718d410a40 @fgarcia committed Nov 29, 2011
Showing with 9 additions and 6 deletions.
  1. +6 −3 plugin/pnote.vim
  2. +3 −3 syntax/pnote.vim
View
@@ -145,10 +145,13 @@ fu! Pnote_parseTags()
if (lnum == 0)
break
endif
- normal ee
+ normal le
let tag_end_position = col('.')
- let found_tag = strpart( getline(lnum), col+1, tag_end_position)
- call add( tag_list, found_tag )
+ let tag_length = tag_end_position - col
+ let found_tag = strpart( getline(lnum), col+1, tag_length)
+ if index( tag_list, found_tag ) == -1
+ call add( tag_list, found_tag )
+ endif
endwhile
call setpos ('.', starting_position)
return tag_list
View
@@ -30,7 +30,7 @@
if "b:current_syntax" == "pnote"
finish
endif
-runtime syntax/markdown.vim
+"runtime syntax/markdown.vim
let b:current_syntax = "pnote"
syn keyword confTodo contained TODO FIXME XXX
@@ -45,7 +45,7 @@ syn match COMMAND "\s*$\s[^#]*" contains=Comment
syn match LIST "^\s\+\*"
syn match WARNING "^\s*!!!\s.*$"
syn match BIBLIO "\[\w\+\]"
-syn match TAG "\s@\w\+" contains=@NoSpell
+syn match PNOTETAG "\s@\w\+"
"syn region block start=+^#+ end=+^\s*$+ contains=inside,confComment,ANOTATION
"syn region inside start=+^ + skip=+$\+ + end=+^\s*$+ contained fold
@@ -64,7 +64,7 @@ hi LIST guifg=magenta
hi WARNING guifg=red
hi BIBLIO guifg=magenta
hi KEYWORD guifg=lightred
-hi TAG guifg=lightmagenta
+hi PNOTETAG guifg=lightmagenta
" vim: ts=8 sw=2

0 comments on commit 3576fef

Please sign in to comment.