New answers tagged vimrc
0
votes
How to search and replace the highlighted text from visual mode?
In order to mimic what you have done for normal mode I would do:
vim.keymap.set("v", "<leader>r", [["hy:%s/<C-r>h/<C-r>h/gI<Left><Left><left&...
4
votes
Accepted
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 ...
2
votes
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 ...
0
votes
How to share config between Vim and Neovim
I used the following:
VIMINIT='if has("nvim")|let f="init.lua"|else|let f="vimrc"|end|let $MYVIMRC="~/.config/vim/".f|source $MYVIMRC'
Then put all files in ~/....
Top 50 recent answers are included
Related Tags
vimrc × 1802vimscript × 257
key-bindings × 231
neovim × 160
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