Skip to content

Commit

Permalink
Handle escaped quotes in the fishString syntax definition.
Browse files Browse the repository at this point in the history
cc: dag#47
  • Loading branch information
blank_name committed Jan 5, 2020
1 parent c0172e6 commit 129fee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax/fish.vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ syntax keyword fishLabel case
syntax match fishComment /#.*/
syntax match fishSpecial /\\$/
syntax match fishIdentifier /\$[[:alnum:]_]\+/
syntax region fishString start=/'/ skip=/\\'/ end=/'/
syntax region fishString start=/"/ skip=/\\"/ end=/"/ contains=fishIdentifier
syntax region fishString start=/'/ skip=/\v(\\{2})|(\\)'/ end=/'/
syntax region fishString start=/"/ skip=/\v(\\{2})|(\\)"/ end=/"/ contains=fishIdentifier
syntax match fishCharacter /\v\\[abefnrtv *?~%#(){}\[\]<>&;"']|\\[xX][0-9a-f]{1,2}|\\o[0-7]{1,2}|\\u[0-9a-f]{1,4}|\\U[0-9a-f]{1,8}|\\c[a-z]/
syntax match fishStatement /\v;\s*\zs\k+>/
syntax match fishCommandSub /\v\(\s*\zs\k+>/
Expand Down

0 comments on commit 129fee7

Please sign in to comment.