Bash vi mode not working perfect
Hey guys,
I am trying to use bash vi mode by issuing "set -o vi" but I am facing two issues; first many of the vi commands are not working and second once I am in the command mode by pressing the Esc key just after I press a single button (e.g., b to go back a word) the mode changes to the normal insert mode. I'm wondering whether there is a way around these two problems. :) Thanks -Hamid |
Your first problem is somewhat nondescript shall I say.
Which vi commands aren't working? Re the 2nd issue: My bash *doesn't* exit vi command mode after the first command; it stays in command mode until I press i,a, ... some editing command. Maybe you're using odd keybindings? Cheers, Tink |
Hi hhamid,
Why you not use vim? it is advance version of vi. regard, |
Vi is vim on Ubuntu.
|
vi vim
you could try a different editor and see if the same thing happens.
|
there is no package called vi in ubuntu.
vim-tiny is a compact version installed by default. |
my apologize..
thanks jay73 and sem007 |
Did ANY of you guys actually READ his question? He's trying to use line-editing in
bash in vi-mode, rather than in bash's default, emacs mode. Cheers, Tink |
Yes, I did. I have actually tried it out on my box and I haven't experienced any problems so it's probably a matter of configuration.
|
Quote:
He is using bash's vi input mode which lets you type commands as it it were a vi editor. |
Actually it's kinda weired. Playing more with it, it sounds like sometimes it works well and sometimes I have the mentioned problem. I'm not sure why that is. BTW, once I enter in the vi mode, how can I exit from this binding? I mean is there like an unset command or sth (what is it exactly)? Also what are the different keyboards bindings available besides the vim and emacs? Does anyone have a good reference or link for these stuff?
Thanks --Hamid Quote:
|
The bash man-page basically has it all. There's only emacs (the default)
and vi mode; to get from vi back to emacs, just use 'set -o emacs'. Cheers, Tink P.S.: Please, don't "top post". It's a pointless and ugly habit in e-Mail, but on a forum even more so. |
Tinkster,
Thanks for the useful info. BTW as for doing top post, if you're referring to quoting by that I don't see why you think it is pointless and even ugly. Especially in a thread like this where there are multiple posts from different people, it would make it really easy to follow whom and what you're responding to. Ofcourse, you could always refer to people by their names as an alternative but what if there are many posts over multiple pages. And also again in that case whoever is following the thread would need to go back and forth between different posts which would make it kinda hard to follow. So, I really think quoting is actually beneficial.... PS: Not quoting this post as you requested though! :P Thanks --Hamid |
Quote:
is what's pointless. And ugly. And wasteful. ;} Code:
A: Because it messes up the order in which people normally read text. Cheers, Tink |
Quote:
--Hamid |
All times are GMT -5. The time now is 03:38 PM. |