On 22/05/10 07:00, Aryeh M. Friedman wrote:
John Beckett wrote:
Aryeh M. Friedman wrote:
When I installed vim on my gentoo system it came with three
defaults I can't figure out how to turn off:

1. Search highlighting
2. The above remembered from session to session
3. Automatically moving me to the last edit in a file
(if there is one) when I open it

Read this for 1 and 2:
http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches

For 3, in Vim, enter:
:scriptnames

Possibly the list of scripts that have run on your system will
include vimrc_example.vim which includes some code to restore
the cursor position. If so, we might advise how best to proceed.

John

Ok took care of the highlighting... but the :scriptnames does not show
the one you mentioned:

1: /etc/vim/vimrc
2: /usr/share/vim/vim72/syntax/syntax.vim
3: /usr/share/vim/vim72/syntax/synload.vim
4: /usr/share/vim/vim72/syntax/syncolor.vim
5: /usr/share/vim/vim72/filetype.vim
6: /usr/share/vim/vimfiles/ftdetect/gentoo.vim
7: /usr/share/vim/vim72/ftplugin.vim
8: /home/aryeh/.vimrc
9: /usr/share/vim/vim72/colors/elflord.vim
10: /usr/share/vim/vim72/syntax/nosyntax.vim
11: /usr/share/vim/vimfiles/plugin/bugsummary.vim
12: /usr/share/vim/vimfiles/plugin/gentoo-common.vim
13: /usr/share/vim/vimfiles/plugin/newebuild.vim
14: /usr/share/vim/vimfiles/plugin/newinitd.vim
15: /usr/share/vim/vimfiles/plugin/newmetadata.vim
16: /usr/share/vim/vim72/plugin/getscriptPlugin.vim
17: /usr/share/vim/vim72/plugin/gzip.vim
18: /usr/share/vim/vim72/plugin/matchparen.vim
19: /usr/share/vim/vim72/plugin/netrwPlugin.vim
20: /usr/share/vim/vim72/plugin/rrhelper.vim
21: /usr/share/vim/vim72/plugin/spellfile.vim
22: /usr/share/vim/vim72/plugin/tarPlugin.vim
23: /usr/share/vim/vim72/plugin/tohtml.vim
24: /usr/share/vim/vim72/plugin/vimballPlugin.vim
25: /usr/share/vim/vim72/plugin/zipPlugin.vim
26: /usr/share/vim/vim72/ftplugin/java.vim
27: /usr/share/vim/vim72/syntax/java.vim
28: /usr/share/vim/vim72/syntax/html.vim

my .vimrc:

colorscheme elflord
syntax enable
set nosi
set noai
set nocindent
set fo=""
set nohlsearch


Then I suspect that it is an autocommand similar to what Ben Fritz mentioned, and sitting in either /etc/vim/vimrc or /usr/share/vim/vimfiles/plugin/gentoo-common.vim.

        :verbose au BufRead

might tell you. If that autocommand is in an autocommand group (listed left of BufRead in the listing produced by the above command), it will be quite easy to disable, but how to do it will depend on where the autocommand is found (in the system vimrc or in the gentoo-common global plugin) and on how the autocommand group is named.


You may want to compile your own Vim from Bram's pristine sources, see:
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
-- it is not really difficult, and it will free you from gentoo's high-handed "we know better than you what is good for you" attitude.


Best regards,
Tony.
--
ARTHUR:  Then who is your lord?
WOMAN:   We don't have a lord.
ARTHUR:  What?
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
         turns to act as a sort of executive officer for the week.
The Quest for the Holy Grail (Monty Python)

--
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

Reply via email to