vsch / MissingInActions

Adds new editing capability to JetBrains IDEs like auto-line selections, multi-caret manipulation and move to next/previous end of word.
Apache License 2.0
47 stars 0 forks source link

Move cursor next/prev custom options like we have for delete and backspace. (enhancement) #27

Open j-a-s-o-n-g opened 2 years ago

j-a-s-o-n-g commented 2 years ago

I'm aware of all the camelhumps modes in IntelliJ where they treat camelcase and snakecase as different words, but hyphen words are always treated as different words and there's currently no way around this AFAIK.

I would like to have a selection mode with the same regex pattern for "next/prev word" so I can use both \w and "-".

Test cases: | = cursor, [is final selection]

|this word test random |thisIsAlsoAWord test random |This_is_a_Word |this_is_a_word |this-word.extension

Becomes:

[this] word test random [thisIsAlsoAWord] test random [This_is_a_Word] [this_is_a_word] [this-word].extension

The options don't have to be so elaborate for this, if you want to just throw in a keymap for:

hard coded to work like the examples above, that would be great!

krasa commented 2 years ago

Relates to https://github.com/krasa/StringManipulation/issues/165

vsch commented 1 year ago

The customized word next/prev start/end/ customized does have some flexibility. You can configure them to only treat space delimited ranges as one word but that would include any delimiters other than spaces so abc.def would also be considered a word.

Adding a regex like the backspace/delete is an idea. I did not include it because I wasn't sure anyone would want to go that far at customizing it.

Screenshot_CustomizedWord