Hot answers tagged

6 votes
Accepted

How do I undo the result of the remap of ( to ()?

You can bypass mappings (among other things) with Ctrl-V: <C-v>( should enter a ( without executing the mapping.
D. Ben Knoble's user avatar
  • 25.3k
3 votes

How can I extend syntax highlighting with my own keywords?

The correct filetype for JavaScript is javascript, so your file, which corresponds to a non-existing js filetpe, will never be sourced automatically. It should be: ~/.vim/syntax/javascript.vim Vim ...
romainl's user avatar
  • 39.1k
3 votes

How do I undo the result of the remap of ( to ()?

If you usually want to insert the closing parenthesis and occasionally don't want it to be added, you could define another mapping such as inoremap (( ( This will allow you to type a single opening ...
Friedrich's user avatar
  • 1,189
3 votes
Accepted

Is user vimfiles/after/ftplugin supposed to be after system/indent?

Let's start with a blank vimrc: " Hello, world! Vim doesn't do any filetype-specific stuff by default: no ftplugins, no syntax highlighting, nothing. We can tell Vim to start doing filetype-...
romainl's user avatar
  • 39.1k
2 votes
Accepted

How to save the files when global replace completed in one command line

Yes. The problem is that global takes all the rest of its arguments as the command to execute on matching lines. But you can manipulate what it sees with execute: let i=1 | execute 'global/regexp/...
D. Ben Knoble's user avatar
  • 25.3k
1 vote

How can I extend syntax highlighting with my own keywords?

Your solution is already pretty close. However, there are three minor issues with it: The filetype for JavaScript is called "javascript", not "js". That's what your file is ...
Friedrich's user avatar
  • 1,189

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