Monday, August 23, 2010

Re: Vim 7.3 - View Previous Commands and Searches

Roy Fulbright wrote:
>
>
> ------------------------------------------------------------------------
> From: rfulbrig@hotmail.com
> To: vim_use@googlegroups.com
> Subject: Vim 7.3 - View Previous Commands and Searches
> Date: Mon, 23 Aug 2010 10:13:27 -0400
>
> I am using Vim 7.3 on Windows Vista. The following scenario worked in
> Vim 7.2, but does not work in Vim 7.3:
>
> While editing a file, I enter the following command - :s/a/b/
> I then enter a colon (:) and press the up and down arrows to view and
> select any previous commands I have entered.
>
> While editing a file, I enter the following search - /abc
> I then enter a slash (/) and press the up and down arrows to view and
> select any previous searches I have entered.
>
> What option(s) must be set to restore the ability to view previous
> commands and searches?
>
> Thanks,
> Roy
>
> UPDATE - SOLUTION:
> The installation placed _vimrc here: C:\Program Files (x86)\vim\_vimrc
> I moved it (actually my _vimrc from 7.2) to: C:\Program Files
> (x86)\vim\vim73\_vimrc
>
> I now remember having to do this when installing 7.2. Why does the
> installation
> location (C:\Program Files (x86)\vim\_vimrc) cause such differences?
I'm not on vista at the moment, but:

I don't see a _vimrc in /usr/local/share/vim/vim73, which I think
corresponds to your c:\Program Files (x86)\vim\vim73 directory; I do see
a vimrc_example there.

You shouldn't put your _vimrc in C:\Program Files
(x86)\vim\vim73\_vimrc; as you have found out, it causes problems when
you upgrade. Try putting it in your $HOME directory; to find out where
that is, type

vim
:echo $HOME

and the resulting string gives your home directory path. By putting
your _vimrc there, you won't run into this problem again.

Now, the reasoning: the intention is to keep distributed files separate
from personal files/plugins/etc. Another rule-of-thumb: don't modify
the files in the distribution. Upgrades will either wipe your mods out
or stop use of them (because they're in the wrong directory). Instead,
make, as you need them:

$HOME\vimfiles
$HOME\vimfiles\plugin -- plugins you download go here
$HOME\vimfiles\autoload -- some plugins use this directory
$HOME\vimfiles\after -- you can override/embellish plugins with
files under here

Read :help 'runtimepath'

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: