dkandalov / tab-shifter

Plugin for IntelliJ IDEA to move and split editor tabs
https://plugins.jetbrains.com/plugin/7475
169 stars 12 forks source link

Enable navigation also #3

Closed jaw closed 8 years ago

jaw commented 10 years ago

Splitting is great, but once you have a grid of 2x2 (or even 3x2), it would be nice to be able to move around between these splits.

There is the built-in "goto next splitter", "goto previous splitter" but:

This is how Terminator (the Gnome Terminal wrapper) works and it's a very helpful feature.

Since you're already into these things, would rock if you could implement that :)

catmeme commented 8 years ago

+1

dkandalov commented 8 years ago

Thanks a lot for reminding! Do you have any suggestion for shortcuts?

melihovv commented 8 years ago

@jaw IdeaVim has such feature: ctrl-w (h|j|k|l) - move to window on the left|bottom|top|right. Try it! Vim is awesome!

catmeme commented 8 years ago

I'd be comfortable with vim-like bindings; vim is the reason I want to split and move between splits with my keyboard in the first place :).

Thanks.

dkandalov commented 8 years ago

@catmeme default keyboard layout has "ctrl-w" binded to word selection, so probably it won't work for people who don't have IdeaVim. There might be a way to have separate default shortcuts when vim plugin is installed. I'll check if it's the case.

@melihovv yes, I tried vim, it's great. Although I ended up using my own custom shortcuts :)

catmeme commented 8 years ago

@dkandalov I actually gave up on IdeaVim because I didn't feel it provid enough. alt+shit+[h,j,k,l] would be fine :)

jaw commented 8 years ago

@dkandalov I'd love to have these shortcuts: Alt+I to go up Alt+J to go left Alt+K to go down Alt+L to go right Alt+Shift+I to split vertically Alt+Shift+L to split horizontally

kind of like arrow keys, positioned in the default resting position of the right hand... Since different people want different things I guess making this configurable would be best :) Initially hacking a config file is fine too.

dkandalov commented 8 years ago

I assigned rather complex ctrl+alt+shift+[p]; default shortcuts to make it consistent with existing ones. Sorry for not changing to the ones you suggested, it's just a bit convoluted to choose shortcuts which don't clash with built-in ones in all OS. Of course you can change shortcuts in IDE Settings -> Keymap -> Move Focus Left/Up/Right/Down.

@catmeme it looks like there is no easy way to have different shortcuts for vim plugin :(

dkandalov commented 8 years ago

@jaw (offtopic) it's interesting that you suggested Alt+IJKL shortcuts. This is what I use instead of keyboard arrows (with previous/next word for Alt+JL). Also Alt+UO for start/end of line and the same combinations with Alt+Shift for selection. There are few more tricks to it but that's the idea.

dkandalov commented 8 years ago

@jaw sorry it took such a long time to add this feature : (

catmeme commented 8 years ago

@dkandalov Thanks for this, verified it works :)

jaw commented 8 years ago

@dkandalov yay, works perfectly now :) thanks!!!