Skip to content

Commit 1af585c

Browse files
author
blank_name
committed
Remove '/' from iskeyword so that 'w' doesn't skip over entire paths.
I didn't remove the iskeyword definition entirely because I believe including '_' and '.' is still useful. Also, fix syntax definitions to include '/' as well wherever they use '\k' so that / is still highlighted. cc: dag#44
1 parent fc758c6 commit 1af585c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ftplugin/fish.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ setlocal foldexpr=fish#Fold()
1313
setlocal formatoptions+=ron1
1414
setlocal formatoptions-=t
1515
setlocal include=\\v^\\s*\\.>
16-
setlocal iskeyword=@,48-57,-,_,.,/
16+
setlocal iskeyword=@,48-57,-,_,.
1717
setlocal suffixesadd^=.fish
1818

1919
" Use the 'j' format option when available.

syntax/fish.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ syntax match fishIdentifier /\$[[:alnum:]_]\+/
1515
syntax region fishString start=/'/ skip=/\v(\\{2})|(\\)'/ end=/'/
1616
syntax region fishString start=/"/ skip=/\v(\\{2})|(\\)"/ end=/"/ contains=fishIdentifier
1717
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]/
18-
syntax match fishStatement /\v;\s*\zs\k+>/
19-
syntax match fishCommandSub /\v\(\s*\zs\k+>/
18+
syntax match fishStatement /\v;\s*\zs(\k|[/])+>/
19+
syntax match fishCommandSub /\v\(\s*\zs(\k|[/])+>/
2020

2121
syntax region fishLineContinuation matchgroup=fishStatement
22-
\ start='\v^\s*\zs\k+>' skip='\\$' end='$'
22+
\ start='\v^\s*\zs(\k|[/])+>' skip='\\$' end='$'
2323
\ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment
2424

2525
highlight default link fishKeyword Keyword

0 commit comments

Comments
 (0)