Linked Questions

3
votes
2answers
116 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
2answers
55 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 ...
6
votes
2answers
1k 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
1answer
95 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 ...
0
votes
3answers
52 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 ...
19
votes
5answers
9k 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 ...
-1
votes
1answer
38 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 ...
0
votes
2answers
42 views

Inserting a future time

I would like to create a simple pomodoro timer I can insert into text files. Something like: Current Time - 10:15 End Time - 10:40 However I have not been able to find a good way to insert a future ...
0
votes
2answers
44 views

Test string after a pattern

I want to test, if the cursor is currently in a comment line. For example in C it looks like this: // This is a comment line now it's also possible that it's a big comment section: /* * Big comment ...
2
votes
1answer
286 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 ...
0
votes
1answer
117 views

Searching a log file using vi or view

When I open a log file in vi or view and I need to search for a word, the first thing I do is to press G to get to the bottom. Then I'll start a search using a / followed by whatever word I'm looking ...
1
vote
1answer
40 views

Why does this mapping require hitting enter?

I've written a "script" to highlight all lines that begin with n (for a todo list): syn region dash start=/^n/ end=/$/ oneline | highlight link dash String And mapped it to ; in my init.vim:...
1
vote
1answer
175 views

Usage of t. and | in vim command

I've assembled the following command to take a markdown file and add a ==== under each line that starts with a #: :g/^#/t. | s/./=/g How exactly does this work? As far as I understand: :g/ start a ...
1
vote
1answer
100 views

vim input function with default value

I'm working a function to rename the visual selected text function! Rename() name = getline("'<")[getpos("'<")[2]-1:getpos("'>")[2]-1] let newname = input('rename the selection with: ...
1
vote
1answer
36 views

How to search for documentation on an option which is also a vim command argument? [duplicate]

When a Vim option is also a Vim command argument, :help opens the command argument help page. How can I direct :help to get the option page? For example, trying :help verbose opens the -V verbose ...

15 30 50 per page