4 ms·
Unfortunately, not on INS mode. I can't be editing one line, then quickly create 5 new carets on the lines below, jump to the end of the line and add something,
by klaussilveira 4y ago
Unfortunately, not on INS mode. I can't be editing one line, then quickly create 5 new carets on the lines below, jump to the end of the line and add something, like you can with Sublime.
- eviks 4y agoAs an aside, this is a modal editor, so you're supposed to quickly switch modes But you can also do it in the INS mode but sandwitching the commands in mode shifts, for example, these should work in the INS mode part of your config [keys.insert] 'C-j' = ['normal_mode','copy_selection_on_next_line','insert_mode'] # Copy selection onto the next line (add cursor ↓) 'C-k' = ['normal_mode','copy_selection_on_prev_line','insert_mode'] # Copy selection onto the previous line (add cursor ↑)
- klaussilveira 4y agoAh, interesting. That does work, thank you. How would you implement the (Ctrl|CMD) + D feature from Sublime?
- eviks 4y agoI'd wait until the open issue to select words and another one to allow more command composability are closed with PRs :) Meanwhile you could use something like this (if you already have the word selected as you might likely have since Helix selects by default, then delete the first two command that expand your selection to a word like in Sublime) '*' = ['select_mode' # , 'move_prev_word_start' # , 'move_next_word_end' # , 'search_selection' # , 'extend_search_next' # , 'exit_select_mode' # ] # = find_under_expand
- klaussilveira 4y agoThank you, this is enlightening.
- eviks 4y agoA better alternative more closely matching Sublime by limiting search to word boundaries '*' = ['select_mode' # = find_under_expand , 'move_next_word_end' # 1st since word_start command might select previous word , 'move_prev_word_start' # , 'search_selection' # , 'make_search_word_bounded' # , 'extend_search_next' # , 'insert_mode' # ] #
- klaussilveira 4y agoHah! You're on a roll, thanks. Using this daily and trying to get used to Helix. :)