I just figured out how to combine those creepy plugins to work together to achieve the following auto-indent:
before / after pressing o
:
But then this only works on file extension .jsx
as shown above, while most of the legacy files I'm working on have file extension .js
but all using .jsx
syntax, and in those files the above behaviour won't work:
before / after pressing o
:
As you can see the indentation is incorrect. So as my title, how can I make (neo)Vim consider all .js
as .jsx
by default?
js
filetype configuration:help new-filetype
. Either of the techniques in section A or C will work.let g:closetag_filenames = '*.js,*.jsx,*.html,*.xhtml,*.phtml'
to be set/customized. But what I want to achieve is let.js
be seen as.jsx
from the perspective of plugin-in makers.:runtime[!]
scripts forjsx
. If this is plugin specific, please edit the question with all the relevant details.