MarcoIeni / intellimacs

Spacemacs' like key bindings for IntelliJ platform.
MIT License
536 stars 94 forks source link

[Request] use `EditorCodeBlockStartWithSelection` when in visual mode over `EditorCodeBlockStart` #54

Closed kylesnowschwartz closed 10 months ago

kylesnowschwartz commented 10 months ago

Hi there, firstly thank you for making this plugin it's amazing. I'm extremely new to Jetbrains and specifically Rubymine. I'm trying it out after being on Spacemacs for some years and just got tired of its endless struggles.

As I learn the keybindings and how to do remappings and navigation and such, I thought I might suggest that we change the visual mode remap when using spc + ] and spc +[ to EditorCodeBlockEndWithSelection and its start equivalent. This seems to map more closely with at least my configuration in spacemacs which I think is quite standard, that when in visual mode and jumping to matching braces, visual highlights the selection.

Your thoughts?

" Go to code block start with selection
" (I'm not sure what this line will do so I've left it commented out) let g:WhichKeyDesc_Leader_GotoCodeBlockStartSelection = "<leader>[ goto-code-block-start with selection"
vnoremap <leader>[    <Esc>:action EditorCodeBlockStartWithSelection<CR>

" Go to code block end with selection
" (I'm not sure what this line will do so I've left it commented out) let g:WhichKeyDesc_Leader_GotoCodeBlockEndSelection = "<leader>] goto-code-block-end with selection"
vnoremap <leader>]    <Esc>:action EditorCodeBlockEndWithSelection<CR>
MarcoIeni commented 10 months ago

Hi, first of all thanks for your kind words!

(I'm not sure what this line will do so I've left it commented out)

That line gives a description to the which-key plugin, which for some reason doesn't work for me atm. Does it work for you?

This suggestion is great, thanks! Added in https://github.com/MarcoIeni/intellimacs/commit/f1e78859c902bdf2d95e35683de1e985ad987f52