You are not logged in.
Is there any way to accomplish the equivalent of vim's 'operator pending' remapping with readline vi mode? For example if I have 'A' mapped to 'beginning-of-line' I want 'dA' to delete to the beginning of the line. It was hard enough trying to find how to do this in vim*, I'm coming up empty wrt readline.
* Nevermind the trauma of discovering the necessity: I type dn (n is remapped to f in normal mode) and instead of waiting for input, half my file disappears. ![]()
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
"d0" deletes to the beginning of line in both vim and readline.
Offline
Thanks, but that was just an example. I currently have 10+ movement remaps for readline and expect that number to increase (only been using vi mode for a couple days). The only good solution is finding a way to remap them as operators as well.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
vi-mode is really just a pale imitation of Vi{m}. If you want to access those sorts of operators, you should enter 'v' in normal mode and drop into your $EDITOR...
You can read all of the readline variables here.
Offline
vi-mode is really just a pale imitation of Vi{m}. If you want to access those sorts of operators, you should enter 'v' in normal mode and drop into your $EDITOR...
If you do this then consider setting "shopt -s lithist" in your ~/.bashrc so that commands are expanded multi-line. Much easier to view and edit.
Offline
vi-mode is really just a pale imitation of Vi{m}. If you want to access those sorts of operators, you should enter 'v' in normal mode and drop into your $EDITOR...
You can read all of the readline variables here.
I'm not talking about unavailable operations. 'dw' has the same effect in readline as vim. I have 'O' remapped to 'vi-forward-word', which is functionally equivalent to what 'w' does in readline and vim. If I type 'dO' I simply want the 'O' to mean 'vi-forward-word' in that case too. It doesn't seem so far fetched that this should be possible.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline