Although I made sure that vim-enhanced.i386 is installed, pressing : then upArrow does not show me the last command that I've typed. Might I still be using vim-minimal erroneously? How to fix that? I don't see any mention of this in google or the past few months of fine archives.
Thanks.
[gadi@mercury ~]$ uname -a Linux mercury 2.6.18-194.3.1.el5PAE #1 SMP Thu May 13 13:48:44 EDT 2010 i686 i686 i386 GNU/Linux [gadi@mercury ~]$ yum info vim-enhanced.i386 Repo : installed
On Thu, Oct 21, 2010 at 06:19:54PM +0200, Dotan Cohen wrote:
Although I made sure that vim-enhanced.i386 is installed, pressing : then upArrow does not show me the last command that I've typed. Might I still be using vim-minimal erroneously? How to fix that? I don't see any mention of this in google or the past few months of fine archives.
One possible guess, but it's a guess only and I don't have high hopes for it....
Is there possibly a /bin/vi which takes precedence over /usr/bin/vim? (Or is the command "vim-enhanced"?)
Is there an alias hanging around that is redirecting you? John
On Thu, Oct 21, 2010 at 12:36, Scott Robbins scottro@nyc.rr.com wrote:
On Thu, Oct 21, 2010 at 06:19:54PM +0200, Dotan Cohen wrote:
Although I made sure that vim-enhanced.i386 is installed, pressing : then upArrow does not show me the last command that I've typed. Might I still be using vim-minimal erroneously? How to fix that? I don't see any mention of this in google or the past few months of fine archives.
One possible guess, but it's a guess only and I don't have high hopes for it....
Is there possibly a /bin/vi which takes precedence over /usr/bin/vim? (Or is the command "vim-enhanced"?)
-- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/21/10 9:48 AM, John Kennedy wrote:
Is there an alias hanging around that is redirecting you? John
On Thu, Oct 21, 2010 at 12:36, Scott Robbins <scottro@nyc.rr.com mailto:scottro@nyc.rr.com> wrote:
On Thu, Oct 21, 2010 at 06:19:54PM +0200, Dotan Cohen wrote: > Although I made sure that vim-enhanced.i386 is installed, pressing : > then upArrow does not show me the last command that I've typed. Might > I still be using vim-minimal erroneously? How to fix that? I don't see > any mention of this in google or the past few months of fine archives. One possible guess, but it's a guess only and I don't have high hopes for it.... Is there possibly a /bin/vi which takes precedence over /usr/bin/vim? (Or is the command "vim-enhanced"?)
If you do "which vim" it should show you the path of exactly which vim you are using... There is a history optin in vimrc, is it possible you set this to 0? I believe it sets the number of lines to keep in history.
Cheers, Sean
On Thu, Oct 21, 2010 at 18:36, Scott Robbins scottro@nyc.rr.com wrote:
Is there possibly a /bin/vi which takes precedence over /usr/bin/vim? (Or is the command "vim-enhanced"?)
That's it! Using the command vim instead of vi to open the file gives me history. Can anyone else confirm this? I actually confirmed it on another server, but both were installed from the same sever-farm default image. I'll file a bug if needed and someone confirms.
On Oct 21, 2010, at 1:52 PM, Alfred von Campe wrote:
/bin/vi is supplied by the vim-minimal package
d'oh! Alfred is correct, and i am mistaken (in cause, though not in effect).
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v PGP 8477B706 (A92A 1F7E 6D76 16A0 BFF9 E61D AD54 0251 8477 B706)
On Thu, Oct 21, 2010 at 19:52, Alfred von Campe alfred@von-campe.com wrote:
It's not a bug: /bin/vi is supplied by the vim-minimal package and /usr/bin/vim is supplied by vim-ehnabced. Just alias vi to vim and you should be all set.
Rather than alias it, I'll just get used to typing vim on CentOS installs. I don't like customising remote servers because I like uniformity and I'm often enough at a different server.
I thought it was a bug because other distros "do it differently": they come with the alias. Alas, different is not a bug!
On Oct 21, 2010, at 1:42 PM, Dotan Cohen wrote:
I'll file a bug if needed and someone confirms.
Dotan,
This is not a bug. When you invoke vim as 'vi', the -C option is added, which sets Vim to Vi-compatible mode; this disables a number of features, including :history. From :help history :
:his[tory] Print the history of last entered commands. {not in Vi} {not available when compiled without the |+cmdline_hist| feature}
The "{not in Vi}" means that this feature is not available in Vi-compatible mode.
-steve
-- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v PGP 8477B706 (A92A 1F7E 6D76 16A0 BFF9 E61D AD54 0251 8477 B706)
On Thu, Oct 21, 2010 at 07:42:25PM +0200, Dotan Cohen wrote:
On Thu, Oct 21, 2010 at 18:36, Scott Robbins scottro@nyc.rr.com wrote:
Is there possibly a /bin/vi which takes precedence over /usr/bin/vim? (Or is the command "vim-enhanced"?)
That's it! Using the command vim instead of vi to open the file gives me history. Can anyone else confirm this? I actually confirmed it on another server, but both were installed from the same sever-farm default image. I'll file a bug if needed and someone confirms.
I've had it happen, but don't remember what system. FreeBSD, for example, makes a distinction between vi and vim, vim being in /usr/local if installed--one doesn't want to symlink, because in FreeBSD's case, /usr is not mounted if booted in single user mode.
I wouldn't even consider it a bug. This way, users preferring the sparser vi can use it and those who prefer vim can make an alias in their .bash_profile.