After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743020 - Doesn't use VIM bindings for split-screen
Doesn't use VIM bindings for split-screen
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
: 743261 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-01-16 09:48 UTC by Bastien Nocera
Modified: 2015-01-21 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vim: add basic support for vim splits via ctrl+w operations (9.60 KB, patch)
2015-01-20 23:20 UTC, Christian Hergert
committed Details | Review
editor: wire vim split operations to editor splits (4.75 KB, patch)
2015-01-20 23:20 UTC, Christian Hergert
committed Details | Review
vim: add simple support for cycling through visible buffers (4.75 KB, patch)
2015-01-21 00:55 UTC, Christian Hergert
committed Details | Review

Description Bastien Nocera 2015-01-16 09:48:39 UTC
I regularly use Ctrl+W followed by "S" to get a horizontal split in VIM. In gnome-builder, this just closes the current file/window.

Horizontal splits might not be possible with the current UI, so Ctrl+W "S" (as well as Ctrl+W "V"), should split vertically. Ctrl+W followed by Ctrl+W would switch views.
Comment 1 Igor Gnatenko 2015-01-18 14:47:28 UTC
indeed. I think we need to improve keybindings in VIM mode.
Comment 2 Alexandre Franke 2015-01-20 18:15:45 UTC
*** Bug 743261 has been marked as a duplicate of this bug. ***
Comment 3 Christian Hergert 2015-01-20 23:20:31 UTC
Created attachment 295052 [details] [review]
vim: add basic support for vim splits via ctrl+w operations

This supports creation of vertical and horizontal splits as well as
closing the current split. Note that this only plumbs the signals, and
the embedder is responsible for implementing what a split means.

This does not currently implement support for navigation through the
splits. That can be implemented separately from this.
Comment 4 Christian Hergert 2015-01-20 23:20:35 UTC
Created attachment 295053 [details] [review]
editor: wire vim split operations to editor splits
Comment 5 Christian Hergert 2015-01-20 23:22:10 UTC
Please give this a try!

However, it does not yet implement ^w^w ^wn ^wp or ^w<arrow> movements.

The following should be supported:

:split
:vsplit
:sp
:vsp
^wc
^ws or ^wS
^wv

Cheers!
Comment 6 Christian Hergert 2015-01-20 23:29:17 UTC
Attachment 295052 [details] pushed as 6f45a1d - vim: add basic support for vim splits via ctrl+w operations
Attachment 295053 [details] pushed as a0b3f51 - editor: wire vim split operations to editor splits
Comment 7 Christian Hergert 2015-01-21 00:55:13 UTC
Created attachment 295055 [details] [review]
vim: add simple support for cycling through visible buffers

Supported movements are:

  ^w^w
  ^wn
  ^wp

We do not currently support moving between the stacked splits, that will
be done in a follow up commit.
Comment 8 Christian Hergert 2015-01-21 00:55:31 UTC
Comment on attachment 295055 [details] [review]
vim: add simple support for cycling through visible buffers

Attachment 295055 [details] pushed as 0611988 - vim: add simple support for cycling through visible buffers
Comment 9 Ray Strode [halfline] 2015-01-21 14:22:11 UTC
hey this is great, thanks for the fast turn around.  one thing I noticed, is I use "^w w" not "^w^w" to switch between splits and so when trying this is out i ended up putting "w" in my buffer.

I filed bug 743299 to cover that case.