kitty_grab icon indicating copy to clipboard operation
kitty_grab copied to clipboard

Vim style movement

Open IndianBoy42 opened this issue 2 years ago • 8 comments

Is it possible through configuration to make the movement vim style (for example like alacritty's ctrl+shift+space)

IndianBoy42 avatar Aug 11 '21 12:08 IndianBoy42

I do not know what Ctrl+Shift+Space does in Alacritty.

I do know vim has a whole chapter in its manual called motion.txt and spanning almost one and a half thousand lines, and that not including search commands.

I know some vim commands use a prefix key such as g. Kitty has a key1>key2 syntax for key sequences, but I have not tested if they work in kitty_grab. Likely not yet.

I also know most vim commands can be prefixed with numbers, and I am certain Kitty does not have a syntax for that.

Lastly, I know some people have had success setting up vim or neovim as a screen grabber / scrollback browser for Kitty, see here and there.

yurikhan avatar Aug 11 '21 15:08 yurikhan

Well you don't have to support all of vims motions of course. Alacrittys vi mode just supports the basics

hjkl instead of arrows

wbe for moving by word

v to start selecting, V to select whole lines at a time

y to copy what has been selected

/? to search fwd/bwd

That's just about what alacritty supports

IndianBoy42 avatar Aug 11 '21 15:08 IndianBoy42

hjkl instead of arrows

Possible.

wbe for moving by word

Two of three possible, because kitty_grab does not implement two different ways to move forward by words.

v to start selecting, V to select whole lines at a time

Modal selection is not currently implemented. I might accept a patch.

y to copy what has been selected

Possible.

/? to search fwd/bwd

Search is not yet implemented. I have a wishlist item (#5) for search but it’s about emacs-style isearch rather than vim-style regexp search.

(Offtopic: When replying via mail client, please delete anything that should not go into a comment. This includes your mail signature and bottom-quoting.)

Also, have you read the sample config? It should have told you everything that is possible.

yurikhan avatar Aug 11 '21 15:08 yurikhan

Any new on this?

The most important stuff would be:

v to start selecting, V to select whole lines at a time

storopoli avatar Jan 17 '22 09:01 storopoli

Are you volunteering to implement that?

yurikhan avatar Jan 17 '22 10:01 yurikhan

No, I am not proficient in Python. Just that alacritty does this so elegantly.

storopoli avatar Jan 17 '22 10:01 storopoli

Then I have no news for you, sorry.

yurikhan avatar Jan 17 '22 10:01 yurikhan

Hey @IndianBoy42 , there's part of this is already implemented on kitty. For example, Ctrl+G let you go around the output of the last command (it uses less in the background I think). Some people (including me) are also using nvim as a scrollback pager to be able to select text. This is my configuration for example.

tigerjack avatar Jan 17 '22 16:01 tigerjack