[gtksourceview: 5/5] Merge support for Vim emulation
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview: 5/5] Merge support for Vim emulation
- Date: Fri, 12 Nov 2021 05:41:59 +0000 (UTC)
commit 0ceccfdf7bf3d40bd619efa649629e3f3289f3ac
Merge: da90b15a 15f4c270
Author: Christian Hergert <christian hergert me>
Date: Fri Nov 12 05:41:57 2021 +0000
Merge support for Vim emulation
This adds a new GtkIMContext implementation that attempts to emulate
a modern Vim experience. It can be used with a GtkSourceView by
connecting it to a GtkEventControllerKey and adding it to a view.
This is an initial implementation and could use further work on
matching semantics with Vim. However it has a number of features
beyond what was implemented in GNOME Builder.
Various features supported by GtkSourceVimIMContext include:
- Normal, Insert, Replace, Visual, and Visual Line modes
- Support for an integrated command bar and current command preview
- Search and replace
- Motions and Text Objects
- History replay
- Jumplists within the current file
- Registers including the system and primary clipboards
- Creation and motion to marks
- Some commonly used Vim commands
Closes #233
See merge request GNOME/gtksourceview!225
NEWS | 22 +
docs/reference/gtksourceview-5.0-sections.txt | 19 +
docs/reference/gtksourceview-docs.xml.in | 1 +
gtksourceview/gtksource.h | 1 +
gtksourceview/gtksourcebuffer.c | 7 +
gtksourceview/gtksourceinit.c | 2 +
gtksourceview/gtksourcetypes.h | 1 +
gtksourceview/gtksourceutils.c | 5 +-
gtksourceview/gtksourcevimimcontext-private.h | 38 +
gtksourceview/gtksourcevimimcontext.c | 605 ++++++
gtksourceview/gtksourcevimimcontext.h | 49 +
gtksourceview/meson.build | 5 +
gtksourceview/vim/gtksourcevim.c | 505 +++++
gtksourceview/vim/gtksourcevim.h | 48 +
gtksourceview/vim/gtksourcevimcharpending.c | 101 +
gtksourceview/vim/gtksourcevimcharpending.h | 36 +
gtksourceview/vim/gtksourcevimcommand.c | 1737 +++++++++++++++
gtksourceview/vim/gtksourcevimcommand.h | 49 +
gtksourceview/vim/gtksourcevimcommandbar.c | 315 +++
gtksourceview/vim/gtksourcevimcommandbar.h | 38 +
gtksourceview/vim/gtksourceviminsert.c | 598 ++++++
gtksourceview/vim/gtksourceviminsert.h | 60 +
gtksourceview/vim/gtksourceviminsertliteral.c | 101 +
gtksourceview/vim/gtksourceviminsertliteral.h | 34 +
gtksourceview/vim/gtksourcevimjumplist.c | 260 +++
gtksourceview/vim/gtksourcevimjumplist.h | 41 +
gtksourceview/vim/gtksourcevimmarks.c | 160 ++
gtksourceview/vim/gtksourcevimmarks.h | 42 +
gtksourceview/vim/gtksourcevimmotion.c | 2840 +++++++++++++++++++++++++
gtksourceview/vim/gtksourcevimmotion.h | 90 +
gtksourceview/vim/gtksourcevimnormal.c | 1478 +++++++++++++
gtksourceview/vim/gtksourcevimnormal.h | 35 +
gtksourceview/vim/gtksourcevimregisters.c | 325 +++
gtksourceview/vim/gtksourcevimregisters.h | 44 +
gtksourceview/vim/gtksourcevimreplace.c | 139 ++
gtksourceview/vim/gtksourcevimreplace.h | 34 +
gtksourceview/vim/gtksourcevimstate.c | 1464 +++++++++++++
gtksourceview/vim/gtksourcevimstate.h | 199 ++
gtksourceview/vim/gtksourcevimtexthistory.c | 344 +++
gtksourceview/vim/gtksourcevimtexthistory.h | 38 +
gtksourceview/vim/gtksourcevimtextobject.c | 557 +++++
gtksourceview/vim/gtksourcevimtextobject.h | 59 +
gtksourceview/vim/gtksourcevimvisual.c | 919 ++++++++
gtksourceview/vim/gtksourcevimvisual.h | 45 +
gtksourceview/vim/meson.build | 18 +
po/POTFILES.in | 3 +
tests/meson.build | 1 +
tests/test-vim.c | 206 ++
tests/test-widget.c | 45 +-
tests/test-widget.ui | 36 +-
testsuite/meson.build | 3 +
testsuite/test-vim-input.c | 227 ++
testsuite/test-vim-state.c | 74 +
testsuite/test-vim-text-object.c | 248 +++
54 files changed, 14341 insertions(+), 10 deletions(-)
---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]