Bug 288351 - [VI Mode] Feature Request : Support vi macro record
Summary: [VI Mode] Feature Request : Support vi macro record
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: 3.0-rc3
Platform: Ubuntu Linux
: NOR wishlist with 20 votes (vote)
Target Milestone: ---
Assignee: Simon St James
Depends on:
Reported: 2011-12-06 18:43 UTC by Tim Henderson
Modified: 2013-09-12 12:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Henderson 2011-12-06 18:43:33 UTC
Version:           3.0-rc3 (using KDE 4.7.2) 
OS:                Linux

vi macros are super useful! I love using Kate for most of my heavy duty development but I miss being about to record macros. They are often easier to think about than creating a complex find replace expression, and since they can record any actions they can do things that regex find/replace can't. It would be great if Kate added support for them to the vi emulation.


qa " start recording a macro save it in the "a" buffer
do stuff
q  " stop recording the macro


5@a " execute the macro five times in a row

Reproducible: Always

Steps to Reproduce:
<Esc>qa [with vi mode turned on obviously]

Actual Results:  
[enters insert mode]

Expected Results:  
should start recording a macro

OS: Linux (x86_64) release 3.0.0-13-generic
Compiler: gcc

Kubuntu 11.10 stock version of Kate
Comment 1 Simon St James 2012-10-16 19:25:50 UTC
This is a fairly big one, but I'm going to have a stab at it :)

The most potentially troublesome areas are integration with Kate's Find/ Replace dialog (if you want to incorporate searches into your macros) and with Kate's execute command dialog (if you blah, blah :))

For this reason, I'll probably start with getting an (optional) implementation of Vim's "command mode" thingy which will live in the Vim status bar - only searches/ commands executed via this will be recorded in the macros, as the alternative is probably too hard to implement (and to write automated tests for). Plus, you'll be able to dismiss the Search bar with C-c instead of ESC :)

No ETA, but I'll start within the next couple of days, and am not employed at the moment so can work (almost ;)) full time on it.
Comment 2 Christoph Cullmann 2012-11-03 15:55:13 UTC
:) Any fix is highly welcome, you will make many people happy, like for other Vi bugs ;)
Comment 3 Simon St James 2013-09-04 17:27:14 UTC
Kate master (will be 4.12) now has a fairly complete macro implementation.