Bug 288351

Summary: [VI Mode] Feature Request : Support vi macro record
Product: [Applications] kate Reporter: Tim Henderson <tim.tadh>
Component: Vi Input ModeAssignee: Simon St James <kdedevel>
Status: RESOLVED FIXED    
Severity: wishlist CC: christoph, kdedevel
Priority: NOR    
Version: 3.0-rc3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.12
Sentry Crash Report:

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.

eg.

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

later

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.