Bug 22283 - [PATCH] Move cursor up/down to equal indent
Summary: [PATCH] Move cursor up/down to equal indent
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: scripting (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-13 13:48 UTC by Alan Prescott
Modified: 2012-10-30 21:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments
A kate script to do it (1.88 KB, application/javascript)
2012-10-30 16:40 UTC, Alan Prescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Prescott 2001-03-13 13:43:18 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kwrite
Version:           KDE 2.1.0 
Severity:          wishlist
Installed from:    SuSE RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

There used to be a freeware(?) editor in DOS called Edwin which had one feature I've not seen in other editors - a hot-key to move up and down to equally indented lines (I used to bind this to Ctrl Up/Down). This was a really neat feature for working with indented code - may I suggest this as a future feature for Kwrite please.
- Alan

(Submitted via bugs.kde.org)
(Called from KBugReport dialog. Fields Application KDE Version OS Compiler manually changed)
Comment 1 Magnus Bergmark 2008-06-15 22:45:31 UTC
Confirming this is missing from KDE4 trunk at the moment. Unsure about the future of this feature, though.
Comment 2 Dominik Haumann 2010-11-07 21:20:47 UTC
You can implement this now in upcoming KDE 4.6 very easy as script yourself, see:
http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-scripting.html
(it's possible to bind actions already, the documentation in the link simply was not yet updated to reflect this).

In fact, I do not think this action belongs hard coded in C++ into KatePart.
Comment 3 Christoph Cullmann 2012-10-29 06:45:49 UTC
Provide a script like Dominik says, otherwise this won't get in ever, sorry.
Comment 4 Alan Prescott 2012-10-30 16:40:01 UTC
Created attachment 74884 [details]
A kate script to do it

Since I've just seen a kate script to do nearly what I want following a posting on Planet KDE I took the plunge and modified it to do what I wanted - here's the result.
Please excuse any poor quality javascript code - it's not a programming language I've used much before.
Comment 5 Dominik Haumann 2012-10-30 17:56:33 UTC
Reopen, until we commit this to the new scripting API.
Comment 6 Christoph Cullmann 2012-10-30 19:16:30 UTC
Git commit 4472f3846323aae42ea4f97ef9cfaf597853b38b by Christoph Cullmann.
Committed on 30/10/2012 at 20:15.
Pushed by cullmann into branch 'master'.

first scripting commands contribution since LONG ;)
thanks for patch to Alan Prescott
may more contributions arrive ;)

A  +88   -0    part/script/data/commands/jumpMatchingIndent.js

http://commits.kde.org/kate/4472f3846323aae42ea4f97ef9cfaf597853b38b