Skip to content

Commit

Permalink
Highlight double quoted strings (distinct from single quoted strings)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Nov 25, 2011
1 parent fabedb0 commit 833f1f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autoload/xolox/notes.vim
Expand Up @@ -6,7 +6,7 @@
" Note: This file is encoded in UTF-8 including a byte order mark so
" that Vim loads the script using the right encoding transparently.

let g:xolox#notes#version = '0.15.4'
let g:xolox#notes#version = '0.15.5'

function! xolox#notes#shortcut() " {{{1
" The "note:" pseudo protocol is just a shortcut for the :Note command.
Expand Down
13 changes: 8 additions & 5 deletions syntax/notes.vim
@@ -1,6 +1,6 @@
" Vim syntax script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: July 23, 2011
" Last Change: November 25, 2011
" URL: http://peterodding.com/code/vim/notes/

" Note: This file is encoded in UTF-8 including a byte order mark so
Expand Down Expand Up @@ -37,13 +37,16 @@ highlight def link notesListBullet Comment
syntax match notesListNumber /^\s*\zs\d\+[[:punct:]]\?\ze\s/
highlight def link notesListNumber Comment

" Highlight quoted fragments (inside single quotes). {{{2
" Highlight quoted fragments. {{{2
if xolox#notes#unicode_enabled()
syntax match notesQuotedFragment /‘.\{-}’/
syntax match notesDoubleQuoted /“.\{-}”/
syntax match notesSingleQuoted /‘.\{-}’/
else
syntax match notesQuotedFragment /`.\{-}'/
syntax match notesDoubleQuoted /".\{-}"/
syntax match notesSingleQuoted /`.\{-}'/
endif
highlight def link notesQuotedFragment Special
highlight def link notesSingleQuoted Special
highlight def link notesDoubleQuoted String

" Highlight text emphasized in italic font. {{{2
if has('conceal')
Expand Down

0 comments on commit 833f1f2

Please sign in to comment.