VimBindings.jl icon indicating copy to clipboard operation
VimBindings.jl copied to clipboard

Key bind requests thread

Open caleb-allen opened this issue 3 years ago • 16 comments

Key Bind Request Thread

This thread exists to track key bind requests. Because of limited development time and resources, it is unlikely that VimBindings.jl will ever be a full implementation.

It is helpful to know what users of VimBindings.jl feel is most lacking in order to improve the library for the most amount of users.

If there is a keybinding that you'd like to be added to VimBindings.jl, first check to see if it is already in this thread. Add a :+1: if it exists, otherwise write a comment with the key bind request. Keys or commands which are complex enough can be filed as a separate issue.

Comments with key bind requests that have been completed may be hidden.

Requests

  • [x] Text movements like ciw, ci"
  • [x] 0 to go to beginning of line
  • [x] $, 0 - jump to end of line, jump to start of line
  • [x] f and F for text movements
  • [x] S to clear the line from anywhere and enter insert mode
  • [x] s to delete the current character and enter insert mode
  • [x] r to replace current character
  • [ ] vv - open current line in your $EDITOR (perhaps this could be implemented with the @edit macro)
  • [ ] R Replace mode
  • [x] u, C-r - undo, redo
  • [x] o and O to create a new line below or above the current one and go into insert mode.
  • [ ] ; and , #79
  • [ ] . repeat last change
  • [ ] C-a and C-x to increment and decrement numbers
  • [ ] ~ to switch a character's case

caleb-allen avatar Jan 11 '22 00:01 caleb-allen

0 to go to beginning of line

caleb-allen avatar Jan 11 '22 00:01 caleb-allen

S to clear the line from anywhere

(per https://github.com/caleb-allen/VimBindings.jl/issues/14#issuecomment-1009199314)

caleb-allen avatar Jan 11 '22 00:01 caleb-allen

r to replace current character would be nice instead of deleting then adding.

Of the binding requests, I miss 0 and r most, followed by S to clear the line and enter insert mode, in case I decide that editing the current line is more hassle than typing anew.

Praful avatar Jan 14 '22 19:01 Praful

Hi,

here is a list of key binds I often use when working with zsh and with vi mode enabled (set -o vi, also works with bash):

  • vv - open current line in your $EDITOR (perhaps this could be implemented with the @edit macro)
  • r, R - replace, overwrite
  • various text movements (f, F, t, T) and manipulations like ciw, ci" etc.
  • u, C-r - undo, redo
  • $, 0 - jump to end of line, jump to start of line

Here is also a link to the default vi mode bindings enabled in zle as an inspiration or implementation reference: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets

fatteneder avatar Jun 01 '22 21:06 fatteneder

I think the text movements f and F would be very useful (also posted by @fatteneder; I re-posted here so people could 👍 on just these alone)

MilesCranmer avatar Sep 23 '22 15:09 MilesCranmer

0 to go to beginning of line solved by #26. Thanks @MilesCranmer!

$ has also been fixed (among many others).

Both are in master and will be available in the next version, 0.2.0

caleb-allen avatar Dec 29 '22 05:12 caleb-allen

f and F for text movements is complete! #22

caleb-allen avatar Dec 30 '22 01:12 caleb-allen

o and O to create a new line below or above the current one and go into insert mode.

jlbosse avatar Jun 05 '23 13:06 jlbosse

@fatteneder undo and redo with u and C-r are now implemented in #58 and are available in 0.3.4

caleb-allen avatar Jun 13 '23 16:06 caleb-allen

Wow, I had already forgotten about this package. I just tested it and its amazing :) Keep up the great work!

fatteneder avatar Jun 14 '23 20:06 fatteneder

s to delete the current character and enter insert mode

bjarthur avatar Jun 17 '23 01:06 bjarthur

ci" and ci( to change string contents or function arguments.

ciw works as expected, but ci" not yet

jlbosse avatar Jul 13 '23 10:07 jlbosse

@jlbosse o and O has been fixed

@bjarthur s has been implemented

These are both available in 0.3.7

caleb-allen avatar Jul 18 '23 18:07 caleb-allen

Clipboard integration with y, p, and P has been added in 0.3.8. It is disabled by default, but can be enabled by running VimBindings.Config.system_clipboard!(true). See the docs for more details.

It's disabled by default because I haven't been able to test it across platforms. My development machine runs linux and had some unpredictable issues. My guess is that it is more consistent and stable on other operating systems.

For anybody willing to try it out, feel free to give feedback on #7

caleb-allen avatar Jul 24 '23 13:07 caleb-allen

v

bjarthur avatar Jul 25 '23 16:07 bjarthur