[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: [Kate | Get an Edge in Editing] Comment: "VI Mode"
From:       Erlend Hamberg <erlend () hamberg ! no>
Date:       2011-10-05 8:53:38
Message-ID: CA+G9OXn9z6UB+nDNCPyNg9kXD+=-hQmjJoBmv5uKShT3NnwTaA () mail ! gmail ! com
[Download RAW message or body]

On 3 October 2011 20:44, Gary Kline <wordpress@kate-editor.org> wrote:
> New comment on your post "VI Mode"
> Comment:
> The _one_ vi feature that kate that I would like to see added is the
> abbreviations.  I.e. :ab i I  or :ab tht that.  I am working on a
> text-to-speech application for people who are mute or speech-impaired
> and who cannot type very fast.  I have discovered that by having a
> standard list of roughly 130 abbrevs, typing ordinary English text can
> be speeded up by about 31%.

I don't use this feature that often myself, but it would be a really
nice feature to have in Kate.

> I have been a programmer for many years and am willing to add this
> feature--or at least help with it.
> Please let me know.

Great! What I would suggest is to add this to the "regular Kate", i.e.
not make it a Vi Mode-specific feature. Maybe this could be done as a
plugin that keeps a map of abbrevation → expanded entries and checks
this map when a non-character key is pressed (i.e. space, brackets,
etc.) and then expand the previous word if it is in the list. (Dominik:
Is that possible to do from a plugin?)
This plugin can then register the command "abbreviate" and its shortened
forms to add entries to the map. Ideally it should also have a GUI
config (a table that can be edited).
This functionality will then be available for all users of Kate,
including Vi Mode users.

There is already some related functionality in the Vi Mode code for key
mappings. The key mappings code keeps a list of <keypress> →
<replacement> pairs. You could take a look at how that is done.

-- 
Erlend Hamberg
ehamberg@gmail.com
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic