File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11if exists (" b:did_ftplugin" ) | finish | endif
22let b: did_ftplugin = 1
33
4+ let b: undo_ftplugin = get (b: , ' undo_ftplugin' , ' ' )
5+
46if ! has (' nvim' )
57 setlocal matchpairs += <:>
8+ let b: undo_ftplugin .= " | setlocal matchpairs<"
69endif
710
811if exists (" loaded_matchit" )
@@ -13,9 +16,24 @@ if exists("loaded_matchit")
1316 \ ' <\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' .
1417 \ ' {#\(if\|each\)[^}]*}:{\:else[^}]*}:{\/\(if\|each\)},' .
1518 \ ' {#await[^}]*}:{\:then[^}]*}:{\/await},'
19+ let b: undo_ftplugin .= " | unlet b:match_ignorecase b:match_words"
1620endif
1721
1822" Indent correctly with template string for vim-javascript/builtin
1923" indentexpr
2024let b: syng_str = ' ^\%(.*template\)\@!.*string\|special'
2125let 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