LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2010, 11:14 AM   #1
password636
Member
 
Registered: Jun 2006
Location: Beijing
Posts: 60

Rep: Reputation: 1
vi uses vimrc either?


Hi,

I figured that many of you ever used vim and vi, so I've got two simple questions:

1. After installing vim 7.3 and copied a .vimrc to ~, when use vi (not vim) to open a file, the following error reported:
Code:
Error detected while processing /root/.vimrc:
line  473:
E518: Unknown option: fen
line  474:
E518: Unknown option: fdl=0
Press ENTER or type command to continue
Does .vimrc also affect vi? How can I use vi just in the old way?

2. When using vim to open a file, a word 'NOTE' always highlighted, but if opening another new file containing the word 'NOTE', it would not be hightlighted. Why?

THANKS
 
Old 09-20-2010, 11:37 AM   #2
password636
Member
 
Registered: Jun 2006
Location: Beijing
Posts: 60

Original Poster
Rep: Reputation: 1
I partly found the answer to the question 2: the file name ends with .pl and if 'NOTE' appears as a word inside comments, it will be hightlighted. Seems 'syntax on' makes it this way.
 
Old 09-20-2010, 11:45 AM   #3
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by password636 View Post
Hi,

I figured that many of you ever used vim and vi, so I've got two simple questions:

1. After installing vim 7.3 and copied a .vimrc to ~, when use vi (not vim) to open a file, the following error reported:
Code:
Error detected while processing /root/.vimrc:
line  473:
E518: Unknown option: fen
line  474:
E518: Unknown option: fdl=0
Press ENTER or type command to continue
Does .vimrc also affect vi? How can I use vi just in the old way?
Check if you alias vi to vim.
Quote:
Originally Posted by password636 View Post
2. When using vim to open a file, a word 'NOTE' always highlighted, but if opening another new file containing the word 'NOTE', it would not be hightlighted. Why?

THANKS
The highlighted words were searched in previous session. By default, it will keep highlighting in the next time. You can enter ':hlsearch' to disable the highlighting.
 
Old 09-20-2010, 11:55 AM   #4
password636
Member
 
Registered: Jun 2006
Location: Beijing
Posts: 60

Original Poster
Rep: Reputation: 1
I checked all the aliases with the command 'alias', but no alias to vi.
 
Old 09-20-2010, 02:09 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by password636 View Post
I checked all the aliases with the command 'alias', but no alias to vi.
To find out more, you could use type vi followed by ls -l on the file that type showed. It may be a symlink to vim.
 
Old 09-20-2010, 10:03 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Also try the cmd:

which vi
 
Old 09-20-2010, 10:50 PM   #7
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 211

Rep: Reputation: 67
Quote:
Originally Posted by password636 View Post
I checked all the aliases with the command 'alias', but no alias to vi.
vim, maybe a smaller version compiled with many fewer features for fast startup or just an older version, is installed as your vi. If you have a debian-based distro do `update-alternatives --display vi`, to see what options you already have installed, and you can `vi -u NONE` to see what you're actually getting. But vim it is: only vim is going to read .vimrc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i not getting my .vimrc file in this path ~/.vimrc dina3e Linux - Newbie 6 07-31-2012 05:36 PM
vimrc retab RudraB Linux - Newbie 1 06-22-2009 08:03 PM
little questoin about vimrc..... chunlee Linux - Software 2 06-22-2004 08:06 PM
.vimrc trouble ( Please help ) raees Linux - General 1 04-14-2004 12:53 PM
Need RedHat .vimrc Glock Shooter Linux - General 1 11-11-2003 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration