Skip to content

Commit 1bd5009

Browse files
committed
Tweak ftdetect stuff
I actually think we don't need to be so smart or fancy with this, and in fact would prefer to keep it simple. Just focus on whether they have the plugin on or not. I fear adding the autocmd is not very useful and could have performance implications
1 parent 92e2d71 commit 1bd5009

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ftdetect/javascript.vim

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
au BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setf javascript
22

3-
fun! s:SourceFlowSyntax()
4-
if !exists('javascript_plugin_flow') && !exists('b:flow_active') &&
5-
\ search('\v\C%^\_s*%(//\s*|/\*[ \t\n*]*)\@flow>','nw')
6-
runtime extras/flow.vim
7-
let b:flow_active = 1
8-
endif
9-
endfun
10-
au FileType javascript au BufRead,BufWritePost <buffer> call s:SourceFlowSyntax()
11-
123
fun! s:SelectJavascript()
134
if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>'
145
set ft=javascript

0 commit comments

Comments
 (0)