File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
if exists (" b:did_ftplugin" ) | finish | endif
2
2
let b: did_ftplugin = 1
3
3
4
+ let b: undo_ftplugin = get (b: , ' undo_ftplugin' , ' ' )
5
+
4
6
if ! has (' nvim' )
5
7
setlocal matchpairs += <:>
8
+ let b: undo_ftplugin .= " | setlocal matchpairs<"
6
9
endif
7
10
8
11
if exists (" loaded_matchit" )
@@ -13,9 +16,24 @@ if exists("loaded_matchit")
13
16
\ ' <\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' .
14
17
\ ' {#\(if\|each\)[^}]*}:{\:else[^}]*}:{\/\(if\|each\)},' .
15
18
\ ' {#await[^}]*}:{\:then[^}]*}:{\/await},'
19
+ let b: undo_ftplugin .= " | unlet b:match_ignorecase b:match_words"
16
20
endif
17
21
18
22
" Indent correctly with template string for vim-javascript/builtin
19
23
" indentexpr
20
24
let b: syng_str = ' ^\%(.*template\)\@!.*string\|special'
21
25
let b: syng_strcom = ' ^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc'
26
+ let b: undo_ftplugin .= " | unlet b:syng_str b:syng_strcom"
27
+
28
+ if executable (' npx' ) && ! empty (globpath (&runtimepath , ' compiler/svelte-check.vim' ))
29
+ compiler svelte- check
30
+ let b: undo_ftplugin .= " | compiler make"
31
+ endif
32
+ if exists (' :Open' ) == 2
33
+ " let &keywordprg = ':Open https://devdocs.io/\#q='..&filetype
34
+ nnoremap <buffer> <expr> <F1> '<cmd> Open https://devdocs.io/\#q='..&filetype..' '..expand('<cword> ')..'<CR> '
35
+ if exists (' *getregion' )
36
+ vnoremap <buffer> <expr> <F1> '<cmd> Open https://devdocs.io/\#q='..&filetype..' '..join(getregion(getpos('v'), getpos('.')))..'<CR> '
37
+ endif
38
+ let b: undo_ftplugin .= " | nunmap <buffer> <F1> | vnunmap <buffer> <F1>"
39
+ endif
You can’t perform that action at this time.
0 commit comments