zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

How can I use hjkl to move the cursor; instead of switching previous command or next command

Open whxcode opened this issue 2 years ago • 5 comments

How can I use hjkl to move the cursor; instead of switching previous command or next command.

whxcode avatar Jan 11 '23 09:01 whxcode

Hi @whxcode

Thanks for your issue, you can try to do custom keybindings according to the README instructions, for your requirement, the default keybindings are j -> up-line-or-history and k -> up-line-or-history, it means that if you have a multiline command, you will get the move behaviors, and if you have no any character, you will get the history commands behaviors.

Thanks & Regards

jeffreytse avatar Jan 12 '23 07:01 jeffreytse

Thanks for your answer; I think when I press k/j in normal mode; I can move the cursor up or down like in vim; so I can copy the previous command or some output text.

image Cursor can move in this area

whxcode avatar Jun 09 '23 05:06 whxcode

Hi @whxcode

Thanks for your issue, you can try to do custom keybindings according to the README instructions, for your requirement, the default keybindings are j -> up-line-or-history and k -> up-line-or-history, it means that if you have a multiline command, you will get the move behaviors, and if you have no any character, you will get the history commands behaviors.

Thanks & Regards

Or; is there any other way to move the cursor to the top? Now if I want to copy the above text information; I can only move the cursor with the mouse; and then copy.

whxcode avatar Jun 09 '23 06:06 whxcode

Hi @whxcode If all of a sudden you're using alacritty, it provides that without plugins. https://github.com/alacritty/alacritty/blob/master/docs/features.md#vi-mode

Или; есть ли какой-либо другой способ переместить курсор наверх? Теперь, если я хочу скопировать приведенную выше текстовую информацию; я могу только переместить курсор с помощью мыши; а затем скопировать.

svrvt avatar Jul 31 '23 23:07 svrvt

@whxcode If you're using tmux, you can move the cursor to the top easily as well via the built-in vi mode of tmux.

jeffreytse avatar Aug 01 '23 02:08 jeffreytse