Delete inner word in helix editor

1.7k views Asked by At

I am used to using diw in vim to delete a word when the curser is in the middle of the word. How can I do the same in helix editor?

3

There are 3 answers

0
Mezdelex On BEST ANSWER

miwd

Helix has that highlight first approach, so basically all the motions are the same but relative to that/those selected token/s.

0
LotusCookie On

open your helix editor (e.g ~/.config/helix/config.toml)

and add some config:

[key.normal]
"d"."i"."w" = [
"move_char_right", "move_prev_word_start", "move_next_word_end", "yank_main_selection_to_clipboard", "delete_selection_noyank", ]

and save/apply:
:w
:config-reload

my helix key setting:
https://github.com/TinyProbe/config_tinyprobe/blob/master/config.toml

0
CainKellye On

bed: select back to word start, select until word end, delete

Alt-up or Alt-o, d: expand selection (scope), then delete

(ebd works the same as bed)