lf icon indicating copy to clipboard operation
lf copied to clipboard

set WORDCHARS in lf

Open smhmd opened this issue 4 years ago • 3 comments

in zsh, you can set WORDCHARS, for instance to:

# ~/.zshrc
WORDCHARS=${WORDCHARS//\/[&.;]} 

and that would allow you, among some other things, to remove gradually (e.g., cd media/books/uiux/ | to cd media/books/|, as opposed to: cd media/books/uiux/| to cd |)

How can we set this to lf's cmd, or have it respect zsh's?

smhmd avatar Jan 03 '20 22:01 smhmd

@alivefromupstairs Which commands are you referring to? Our word commands already respects / character except for cmd-delete-unix-word which uses unix words for boundaries.

gokcehan avatar Jan 10 '20 12:01 gokcehan

Yes, I'm referring to cmd-delete-unix-word, image

In this case <c-w> or cmd-delete-unix-word would delete up to :nvim, is there a way to delete in one click up to :nvim ~/.config/lf/? in other words, a cmd-delete-back-word?

smhmd avatar Jan 10 '20 15:01 smhmd

Yeah cmd-delete-unix-word is very destructive/greedy. I expect it to delete up to things like -, /, and ., like the w motion in vim or <c-w> in readline/emacs/vim. But instead it eats up everything ever.

Interestingly, there is a cmd-delete-word which deletes forward the word motion I would expect, but there is no cmd-delete-word-back that does the same thing backword. <c-w> in lf seems to actually run cmd-delete-unix-word, which is equivalent to <c-u> and cmd-delete-home to clear the line in every case I have tested. The forward-equivalent of cmd-delete-unix-wordseems to be cmd-delete-end.

rosshadden avatar Jan 19 '22 16:01 rosshadden