Bug 623654 - vi (vim-minimal) chokes on .vimrc
Summary: vi (vim-minimal) chokes on .vimrc
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-12 12:53 UTC by Clemens Buchacher
Modified: 2011-05-18 17:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 603151
Environment:
Last Closed: 2011-05-18 11:43:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Clemens Buchacher 2010-08-12 12:53:17 UTC
vi from the vim-minimal package is trying to read ~/.vimrc, but complains because it contains vim-specific commands. In my case, output looks like this.

$ /bin/vi
Error detected while processing /home/drizzd/.vimrc:
line   63:
E488: Trailing characters: ^I0put!=line_empty . line_file . line_empty . line_copy . line_empty
line  103:
E488: Trailing characters: ^I0put!=header
Press ENTER or type command to continue

Comment 1 Petr Šabata 2011-05-18 07:23:10 UTC
/bin/vi really acts strange after reading some of my options in .vimrc, making it quite annoying/unusable editor...

Comment 2 Karsten Hopp 2011-05-18 11:43:45 UTC
Works for me, so it looks like you're using a custom .vimrc that doesn't have the necessary checks if a feature is supported.

You need to enclose the offending part of our .vimrc with a feature check so that /bin/vi doesn't try to use it.
A check looks like this:

if has("cscope")
  set csprg=cscope
  ....
endif

You can get a list of feature names that you can use here with :help feature-list

If that still doesn't help, reopen this bugzilla and attach your .vimrc, please

Comment 3 Clemens Buchacher 2011-05-18 17:48:04 UTC
This is a minimal .vimrc that will reproduce my particular problem: (This was part of a function body in case you are wondering.)

put='hi'

IMO it makes no sense for vim-minimal to even try to read a file called .vimrc. There is already a mechanism in the package to not read /etc/vimrc (it's replaced with /etc/virc). I believe the same should apply to the user specific configuration file.


Note You need to log in before you can comment on or make changes to this bug.