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

Vim Mode: Move Block up and down should enter insert mode AND move the block, instead of only entering insert mode #177

Open
nicksettoon opened this issue Nov 14, 2020 · 4 comments

Comments

@nicksettoon
Copy link

hotkeys for moving a block up or down do not work at all. They just start editing the current block. If the block is selected with v, nothing happens. I have the commands currently bound to alt+shift+j/k for down/up respectively. I've tried with hotkeys that are confirmed to work (alt+n/u) and still get the same behavior. I am using RoamThemes as well. However, I tried in chrome without RoamThemes and still get the same issue.

Browser Info:

Vivaldi 3.4.2066.106 (Stable channel) (64-bit)
Revision 9faa7da6e287d30fe3948ac5d9d62aefe7977da5
OS Windows 10 OS Version 1909 (Build 18363.1198)
JavaScript V8 8.6.395.25
Flash (Disabled)
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
@nicksettoon nicksettoon changed the title Move Block up and down doesn't work Vim Mode: Move Block up and down doesn't work Nov 14, 2020
@tntmarket
Copy link
Contributor

Hmm, do they work when you're already in insert mode? The command just calls the native command+shift+arrow, which also doesn't move highlighted blocks.

We should probably make it so if you're in normal mode, it both enters and moves the block though

@tntmarket tntmarket changed the title Vim Mode: Move Block up and down doesn't work Vim Mode: Move Block up and down should enter insert mode AND move the block, instead of only entering insert mode Nov 16, 2020
@nicksettoon
Copy link
Author

Hmm, do they work when you're already in insert mode? The command just calls the native command+shift+arrow, which also doesn't move highlighted blocks.

We should probably make it so if you're in normal mode, it both enters and moves the block though

Ok. When already in insert mode the commands do nothing. Also I don't think entering insert mode after moving the block is a good idea. Having the hotkey do one thing and one thing only is important I think. I would never use the insert mode after I move a block personally. In fact it would make me very annoyed.
Ideally, I would like to be able to move blocks like I do in vscode. I've got alt+h/j/k/l for moving left, down, up, and right respectively.

@tntmarket
Copy link
Contributor

Does the native command+shift+arrow shortcut work for you when you turn off roam toolkit?

I agree that the shortcut should just move the block, not go into insert mode, and stay in normal mode.

It's just that the command+shift+arrow shortcut is the simplest way to shift blocks right now, and it can only be accessed while focused on a block. (Maybe we could simulate drag+drop with the mouse, but that'd be trickier to implement)

I previously tried to make the shortcut go

  • enter insert mode
  • shift block
  • exit insert mode

In succession, but this makes it laggy, especially when you want to shift blocks multiple times quickly.

@nicksettoon
Copy link
Author

yes! ctrl+shift+up does work. However, it has a weird quirk where when moving up, it moves the view port up, but when moving down it doesn't. It's really annoying especially to someone who likes the viewport to only change when I tell it to. That's a default roam thing right? So I don't expect you to be able to change it.

I find dragging and dropping with the mouse to be finicky, cause you've gotta drop it in the exact right spot to keep it at the same indent level, not move it one indent to the right under the block above.

any chance on getting hotkeys for indenting and outdenting tho? I'd love to have those on alt+h/l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants