Linked Questions

0 votes
2 answers
35 views

How to escape spaces when setting options in vimscript?

I am trying to set an option in my init.vim. Specifically, it is the path variable, and I need to set it to a value that contains spaces because several of the directories in my Windows path contain ...
2 votes
1 answer
324 views

How to pass custom arguments to the shell invoked by :terminal?

I would like to specify the startup command to run on the :terminal shell. E.g. bash -c ls. The shell can be specified with set shell=bash, but how to specify the arguments? In another use case, I ...
82 votes
11 answers
136k views

How can I change the font size in gVim?

Is there a way to change the size of the font in gVim, using native commands? And if not, what script can be used to do it quickly?
3 votes
2 answers
6k views

How to change where Vim will read .vimrc file?

I'm re-learning Vim, and now I'm building my own ~/.vim/.vimrc file. Yes, it is store under the .vim/ folder, which is created by MacOSX after I updated to Big Sur. What I want is simply this set ...
19 votes
2 answers
7k views

How to tell Vim not to try to unzip a file?

I'm trying to open an .xlsx file in Vim, but got an error saying: ***error*** (zip#Browse) unzip not available on your system I know it's a binary file, but I want to do some checksums and probably ...
1 vote
1 answer
545 views

What's the reverse action of ctrl-y?

As title. Just like the case where <C-n> and <C-p> is a pair. I would like to know how to scroll down one line at a time.
6 votes
1 answer
4k views

Which setting allows me to text wrap whole words instead of letters?

At the moment, my width is set to 80. when a new line starts, it doesn't take the whole word to the next line. Instead, it takes the lagging letters. Which setting changes this behavior?
-1 votes
1 answer
56 views

What's the meaning of `^=` in vimscript?

What's the meaning of ^= in the following line? set runtimepath^=~/.vim This should be a simple one but I've searched and found nothing. Thanks for your help.
0 votes
0 answers
15 views

":h command" doesn't work with some commads. How to deal with such cases? [duplicate]

When it comes to some commands, getting help is hard. For example, the display command. I know I can use, for example, set display=truncate or set display=lastline, but when I use :h display to read ...
7 votes
2 answers
1k views

On string concatenation, what's the difference between . and .. (single dot and double dot)?

From the :execute help (:h :exe): *:exe* *:execute* :exe[cute] {expr1} .. Executes the string that results from the evaluation of {expr1} as an Ex command. ...
1 vote
2 answers
122 views

Replace " ... " strings of various length with strings that all end at same column but start at different columns for each row

I have the following text Plan based ................................. 32 Iron based in Compound .............................. 34 Gallium Arsnide based III-V ............ 36 ... Indium ...
24 votes
2 answers
8k views

What does <Plug> do in vim?

I came across <Plug> in this command of easy-motion nmap <Leader>w <Plug>(easymotion-overwin-w) I tried to search for the definition of but no luck. What does it mean? Does it have ...
0 votes
1 answer
1k views

How to multi select for the purpose of copy operation?

I can do a search to highlight multiple unrelated words that exist with: /word1\|word2\|word3 But this is only search, it is not "select" (for copy and paste operation) How to highlight ...
2 votes
3 answers
532 views

How to filter without destroying original list?

I have a list of strings which is interesting in its own right, but I also want a filtered version of it for other purposes. But I discovered to my horror that filter, in addition to returning a ...
25 votes
5 answers
19k views

How to find out what a key is mapped to?

I know that running :map commands without arguments should give me a list of user-defined mappings, but, for example, when I press Ctrl-W Ctrl-I something happens, yet I have no idea what function was ...

15 30 50 per page