Questions tagged [macro]

A macro is a recording of typed commands that can be executed later. Macros are stored in registers; recording a macro can be done with q, and you can run them with @.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
205 views

Esc from insert in macro prints ê^ instead of running Esc

Here's a sample macro. 2Ea,^[j^ (Jump to the end of the second word, append a "," escape visual mode, and go to the next line.) Instead of 99 The, I get 99 The,ê^ and it stays stuck in insert mode. ...
1
vote
0answers
31 views

Terminal window interprets quick initial q as macro record

I have a function that opens a terminal window running some program. The program is quit by pressing q. But when I press q in the terminal window shortly after (within 1-2 seconds) of it being opened, ...
1
vote
1answer
37 views

in-place replacement of code in HTML documents with TOhtml?

I'm working on some old HTML documentation, where are multiple code snippets (several lines long). I need to replace this old HTML-ized code with new one using modern styling. What I have now: ... ... ...
1
vote
1answer
66 views

How to add a certain word before the names of methods in Javascript?

I am working with react. First I had a component with state I created methods and all that. Now I want to convert it into stateless component. I have add the word function before each method name. ...
1
vote
0answers
35 views

Creating QuickFixed file to apply QuickFixes via diff

TL;DR I have macros in each %m captured by errorformat after :make. I'd like to have a copy of the file in another split and apply all the macros (so to have a fixed file) and then do a :windo ...
1
vote
0answers
85 views

Macros behaving unexpectedly (not executing commands)

I have the following macro let @f='ivoid function (void param^[o {^M^M^[3kwi' where ^[ represents ESC and ^M new line. for some reason it does not execute anything after the 3k, I tried replacing ...
-1
votes
1answer
47 views

how to move to the end of a string / beginning of string for a macro

i want to write a makro and need to know how i can move to the end and to the beginning of a string, respektively i want to visually select the link so that i can surround it with brackets. my line ...