Skip to content

Getting Involved

Saturday, 4 June 2011 | Dominik Haumann


Recently we’ve had several feature requests in comments of a blog post. If you are interested, you can easily implement this and contribute to Kate. And I’ll even show you how to get started for the following feature. First, build Kate according to /get-it/.

Adding support for ctrl+w {left, right, up, down} to switch the active view.

Kate has a vi input mode. This way, vim users can still use their default work flow but still use Kate at the same time. What’s missing in the current vi input mode implementation is support for view navigation. In vim, to move between different windows, press ctrl-w to switch to the neighboring view. Implementing this is rather easy – the following steps need to be taken care of:

  1. Add vim bindings (=vim shortcuts) to the Kate’s implementation of the ‘normal mode’.
  2. In the implementation, find all visible KateViews.
  3. Compare the global coordinates of the window geometry by using QWidget::mapToGlobal(const QPoint& pos) (for QPoint(0, 0) and QPoint(width(), height()) of all KateViews)
  4. Call setFocus to the nearest matching of the visible views.

Patches are welcome :)

Tags:  planet

See also: