Revision 3d37156...

Go back to digest for 5th August 2012

Features in KDE Base

Erlend Hamberg committed changes in [kate] /vimode:

Add textual repeat for insert mode

Add an option for repeating insert mode as text instead of keystrokes.
The default is keystrokes, which is reset between changes.

For example, when invoking a completion command in insert mode,
textual repeat should be enabled since repeating the completion may
yield different results elsewhere in the document. Therefore, it is
better to repeat the text itself. However, most insertion commands do
not need textual repeat; it should only be used when the repeating of
keystrokes leads to unpredictable results. Indeed, in most cases,
repeating the keystrokes is the most predictable approach.

Having two ways to repeat a change increases the complexity of the
repeat system, but is more flexible. Although choosing one way or the
other would be simpler, a textual-only system (like Vim's) has
shortcomings of its own: e.g., "smart behavior" like auto-pairing
characters would not be repeated correctly by a system that considers
all insertions to be text.

Textual repeat is enabled by calling the function setTextualRepeat().
It is implemented as a combination of the keystrokes leading up to
insert mode and the text inserted in insert mode.

File Changes

Modified 3 files
  • /vimode
  •   part/kateviinputmodemanager.cpp
  •   part/kateviinputmodemanager.h
  •   part/katevinormalmode.cpp
3 files changed in total