4

The best thing to do is enable filetype detection: filetype on Vim defaults to setting .tsx files as typescriptreact (8.1.2100 for me at least). To enable filetype-plugins and indent scripts (recommended): filetype plugin indent on


4

TL;DR Use :h packages You will need the plugin code (github is easiest, though if you just have a copy of the source tree lying around, that works too) A brief history of time managing plugins1 I won't go into extreme detail here unless it is requested. This is mostly a background section, and can be skipped if needed. In the dark ages, you used to need ...


2

The usual way to compile from Vim is to use :make. From :h :make: :mak[e][!] [arguments] 1. All relevant |QuickFixCmdPre| autocommands are executed. 2. If the 'autowrite' option is on, write any changed buffers 3. An errorfile name is made from 'makeef'. If 'makeef' doesn't contain "##", ...


1

I tried to use augroup SyntaxSettings autocmd! autocmd BufNewFile,BufRead *.tsx set filetype=typescript augroup END and it works.


1

What you want is to use a Language Server through the Language Server Protocol (LSP). Read more about it on Wikipedia or on the official website. As the Wikipedia article points out: The Language Server Protocol was originally developed for Microsoft's Visual Studio Code and is now an open standard. So what you get in VS Code is actually being backed ...


1

Instead of using the above config, you can easily use a< from visual mode to select around closing tag, i< to select inner a closing tag.


Only top voted, non community-wiki answers of a minimum length are eligible