You are not logged in.
Pages: 1
Hi all,
I've an interesting question:
Does anyone of you have a urxvt which works like vim??
I have and I don't know why.
Means I can use all vim keybindungs in my urxvt and they behave also like in vim but the v this key opens a file in vim.
To activate it I just have to press "home" or "end".
So does anyone maybe know how I may got this behavior?
Last edited by Andrwe (2009-08-20 09:13:46)
Website: andrwe.org
Repository: repo.andrwe.org/<archtiecture>
Offline
Is your urxvt or your shell working like vim? Both bash and zsh (and probably others) have two basic modes of operation, vi mode and emacs mode (e.g. for zsh look at the keymaps section in the man page). I expect the "home" and "end" keys send an escape sequence that activates the vi command mode in your shell.
Btw. I use a mixture of vi command mode and emacs insert mode, and I find this quite efficient (using zsh).
Offline
I'm using bash.
Where is the mode of operations set?
Website: andrwe.org
Repository: repo.andrwe.org/<archtiecture>
Offline
In your .bashrc, add "set -o vi"
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
While running the shell (or in your bashrc or zshrc or tshrc or etc.)
set -o vi #Sets to vi style keybindings
set -o emacs #Sets to emacs style keybindings
The keybinding used are the ones in the .inputrc or the global /etc/inputrc, so you can customize it if you want. You could man bash and readline for more info.
Offline
Oooh, beat by eleven seconds. The time it took me to check if there was a man inputrc. :-(
Offline
Oooh, beat by eleven seconds. The time it took me to check if there was a man inputrc. :-(
And is it possible to remove such a setting on the fly?
Website: andrwe.org
Repository: repo.andrwe.org/<archtiecture>
Offline
Yes, you could type the "set" command in a session, or bind it to a key as majiq was saying. Maybe it's bound by default. Check "man readline" not "man inputrc". It says, in emacs mode type alt-control-j or alt-control-m (I guess, basically, alt-return) to go to vi mode (you must have done this at some point), in vi mode type control-e to go back to emacs mode.
Last edited by Profjim (2009-08-20 13:24:50)
Offline
Thank to you all I'll start understanding why my shell have this behavior and I'm liking it more and more.:D
So thank you very much.
Website: andrwe.org
Repository: repo.andrwe.org/<archtiecture>
Offline
Offline
Pages: 1