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.
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 ...
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 ...
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-...
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/...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
vimrc × 1801vimscript × 257
key-bindings × 230
neovim × 159
gvim × 88
autocmd × 71
syntax-highlighting × 67
colorscheme × 66
terminal × 52
indentation × 44
plugin-system × 39
filetype × 35
microsoft-windows × 33
macvim × 32
vim-windows × 30
functions × 30
autocompletion × 29
options × 28
cut-copy-paste × 25
command-line × 24
highlight × 24
statusline × 24
plugin-nerdtree × 24
folding × 23
linux × 22