mirror of
https://github.com/khaveesh/vim-fish-syntax.git
synced 2026-09-10 07:16:31 -04:00
Fixed if statements
This commit is contained in:
parent
ea01d4e9ba
commit
080b0582b0
|
|
@ -1,6 +1,6 @@
|
|||
au BufNewFile,BufRead *.fish set ft=fish
|
||||
|
||||
autocmd BufNewFile,BufRead,StdinReadPost *
|
||||
\ if getline(1) =~ '^#!.*\Wfish\s*$' |
|
||||
\ set ft=fish |
|
||||
\ endif
|
||||
\ if getline(1) =~ '^#!.*\Wfish\s*$' |
|
||||
\ set ft=fish |
|
||||
\ endif
|
||||
|
|
|
|||
|
|
@ -9,20 +9,20 @@ setlocal suffixesadd^=.fish
|
|||
|
||||
" Use the 'j' format option when available.
|
||||
if v:version ># 703 || v:version ==# 703 && has('patch541')
|
||||
setlocal formatoptions+=j
|
||||
setlocal formatoptions+=j
|
||||
endif
|
||||
|
||||
if executable('fish_indent')
|
||||
setlocal formatexpr=fish#Format()
|
||||
setlocal formatexpr=fish#Format()
|
||||
endif
|
||||
|
||||
if executable('fish')
|
||||
setlocal omnifunc=fish#Complete
|
||||
for s:path in split(system("fish -c 'echo $fish_function_path'"))
|
||||
execute 'setlocal path+='.s:path
|
||||
endfor
|
||||
setlocal omnifunc=fish#Complete
|
||||
for s:path in split(system("fish -c 'echo $fish_function_path'"))
|
||||
execute 'setlocal path+='.s:path
|
||||
endfor
|
||||
else
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
setlocal omnifunc=syntaxcomplete#Complete
|
||||
endif
|
||||
|
||||
" Use the 'man' wrapper function in fish to include fish's man pages.
|
||||
|
|
@ -31,10 +31,8 @@ endif
|
|||
execute 'setlocal keywordprg=fish\ '.fnameescape(expand('<sfile>:p:h:h').'/bin/man.fish')
|
||||
|
||||
let b:match_words =
|
||||
\ escape('<%(begin|function|if|switch|while|for)>:<end>', '<>%|)')
|
||||
\ escape('<%(begin|function|if|switch|while|for)>:<end>', '<>%|)')
|
||||
|
||||
let b:endwise_addition = 'end'
|
||||
let b:endwise_words = 'begin,function,if,switch,while,for'
|
||||
let b:endwise_syngroups = 'fishKeyword,fishConditional,fishRepeat'
|
||||
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
if exists('b:current_syntax')
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax case match
|
||||
|
|
@ -19,8 +19,8 @@ syntax match fishStatement /\v;\s*\zs\k+>/
|
|||
syntax match fishCommandSub /\v\(\s*\zs\k+>/
|
||||
|
||||
syntax region fishLineContinuation matchgroup=fishStatement
|
||||
\ start='\v^\s*\zs\k+>' skip='\\$' end='$'
|
||||
\ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment
|
||||
\ start='\v^\s*\zs\k+>' skip='\\$' end='$'
|
||||
\ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment
|
||||
|
||||
highlight default link fishKeyword Keyword
|
||||
highlight default link fishConditional Conditional
|
||||
|
|
@ -35,5 +35,3 @@ highlight default link fishStatement Statement
|
|||
highlight default link fishCommandSub fishStatement
|
||||
|
||||
let b:current_syntax = 'fish'
|
||||
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue