Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual block mode doesn't navigate with gj/gk #1772

Closed
Cody157 opened this issue May 28, 2017 · 4 comments
Closed

Visual block mode doesn't navigate with gj/gk #1772

Cody157 opened this issue May 28, 2017 · 4 comments

Comments

@Cody157
Copy link

Cody157 commented May 28, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug Report

Environment:

  • VSCode Version: 1.12.2
  • VsCodeVim Version: 0.8.3
  • OS: Windows 7 Professional SP 1

What happened:
Trying to navigate visual block mode with gj and gk resulted in no vertical movement or selection.

<ctrl-v>gj

What did you expect to happen:
The selection should now include the same block in the following line.

This happens regardless of whether it's navigating between multiple distinct lines, or a single, long word-wrapped line.

@nivv
Copy link

nivv commented Jun 16, 2017

This seems to work for me, also I've re-mapped j to gj and k to gk like below:

    "vim.otherModesKeyBindings": [
        {
            "before": ["j"],
            "after": ["g", "j"]
        },
        {
            "before": ["k"],
            "after": ["g", "k"]
        }
    ]

@Cody157
Copy link
Author

Cody157 commented Jun 20, 2017

@nivv - Are you sure you're testing this with visual block mode, and not either plain visual or visual line modes? Both of those work for me, but visual block doesn't. I had the same keybindings, which is how I found the problem, and had to disable them to use visual block mode at all.

It's worth noting this used to work just fine, I don't know exactly what version it was where the problem started though.

This also on a different computer with some version updates,
Environment:

  • VSCode Version: 1.13.1
  • VsCodeVim Version: 0.8.6
  • OS: OS X El Capitan Version 10.11.6

@Chillee
Copy link
Member

Chillee commented Jun 20, 2017

Yeah this is a consequence of some changes we made to visual block mode to fix some other bugs (I think).

I don't think it should be too hard to fix.

@orn688
Copy link
Contributor

orn688 commented Sep 15, 2017

Has there been any progress on this? I'm making the switch from vim to VS Code and I love it so far, but this fix would be really nice to have. I'd be willing to work on it myself if it really is fairly easy and if anyone can provide some starting guidance, because I have minimal experience with applications of this sort and zero experience with TypeScript.

orn688 added a commit to orn688/Vim that referenced this issue Sep 30, 2017
jpoon pushed a commit that referenced this issue Nov 2, 2017
* Fix gj and gk in visual block mode

Addresses #1772

* Add test for gj and gj in visual block mode

* Resolve merge conflict

* Add missing RegisterAction decorator

* Change line endings to CRLF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants