Skip to main content

Questions tagged [command]

Question about the command functionality that les the user define new Vim commands.

Filter by
Sorted by
Tagged with
11 votes
1 answer
424 views

Why does `<Bar>` behave like `|` in the `:command` command in Vim?

Here is the list of experiments I performed that shows that <Bar> is treated as literal <Bar> in some commands but it is treated as | in the :command command. I am trying to understand why ...
Lone Learner's user avatar
1 vote
2 answers
488 views

Insert Result of an Internal Vim Command into Text/Buffer (e.g. vims echo command)

Question I want to have basically the same as :read ![external command], but instead the external command I want to read the output from an internal command. Example Shells echo / external command: :...
Bog's user avatar
  • 479
1 vote
1 answer
77 views

How to create ctrl map in command directly?

I'm trying to toggle some ctrl maps in command directly, it didn't work as expected: com Test0 nnoremap <c-j> :echo "c-j"<cr> com Test1 nnoremap <c-h> :echo "c-h"<cr> com ...
dedowsdi's user avatar
  • 6,258
1 vote
1 answer
109 views

:command to abort sequence?

To be honest upfront, I wanted to use global to find the first non-matching line, as in v,/usr/lib/, abort (having slashes in the search pattern is the reason for using g instead of / — I'm editing a ...
usretc's user avatar
  • 374
0 votes
0 answers
58 views

How to use <Leader> in a normal command today?

The answer to the question with the same title doesn't seem to work for me. Not sure if the behavior has just changed overtime. To reproduce the issue, open Vim via vim -Nu filebelow.vim, where the ...
Enlico's user avatar
  • 2,194