File: fish.vim

package info (click to toggle)
vim 2%3A9.2.0218-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 96,428 kB
  • sloc: ansic: 435,795; cpp: 6,445; makefile: 4,644; sh: 2,569; java: 2,488; xml: 2,099; python: 1,716; perl: 1,419; awk: 730; lisp: 501; cs: 458; objc: 369; sed: 35; csh: 9; haskell: 1
file content (41 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
" Vim filetype plugin file
" Language:     fish
" Maintainer:   Nicholas Boyle (github.com/nickeb96)
" Repository:   https://github.com/nickeb96/fish.vim
" Last Change:  February 1, 2023
"               2023 Aug 28 by Vim Project (undo_ftplugin)
"               2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
"               2026 Mar 16 by Phạm Bình An (add matchit support)

if exists("b:did_ftplugin")
    finish
endif

let s:saved_cpo = &cpo
set cpo-=C

let b:did_ftplugin = 1

setlocal iskeyword=@,48-57,_,192-255,-,.
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions+=crjq

let b:undo_ftplugin = "setl cms< com< fo< isk<"

" Define patterns for the matchit plugin
if exists("loaded_matchit") && !exists("b:match_words")
  let b:match_words =
      \ '\<\%(else\s\+\)\@<!if\>\|\<\%(switch\|begin\|function\|while\|for\)\>:' ..
      \ '\<else\%(\s\+if\)\?\>\|\<case\>:' ..
      \ '\<end\>'

  let b:match_ignorecase = 0
  let b:match_skip = "S:keyword"

  let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase b:match_skip"
endif

" Restore 'cpo' to its original value
let &cpo = s:saved_cpo
unlet s:saved_cpo