Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#5699 closed bug (fixed)

vim has not been completely removed

Reported by: kaliber Owned by: siarzhuk
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Still remains references in HaikuImage and data/etc/vim/*. It should be removed or moved to the vim optional package.

Change History (9)

comment:1 by mmadia, 14 years ago

Owner: changed from bonefish to siarzhuk
Status: newassigned

HaikuPorts #308 hrev36082 improves the situation. Assigning to siarzhuk

comment:2 by mmadia, 14 years ago

To note, installoptionalpackage is not capable of installing the vimrc file, though it won't prevent installation.

SEARCH on <etc>vimrc = [ FDirName $(HAIKU_TOP) data etc vim ] ; 
AddFilesToHaikuImage common etc vim : <etc>vimrc ; 

comment:3 by siarzhuk, 14 years ago

Why shouldn't remove this vimrc from the Haiku basic installation? For what basic system has something that references to optional stuff?

in reply to:  2 ; comment:4 by siarzhuk, 14 years ago

Replying to mmadia:

To note, installoptionalpackage is not capable of installing the vimrc file, though it won't prevent installation.

SEARCH on <etc>vimrc = [ FDirName $(HAIKU_TOP) data etc vim ] ; 
AddFilesToHaikuImage common etc vim : <etc>vimrc ; 

[the copy of my comment from HaikuPort's Trac]

In my opinion - the vimrc in common/etc/vim is a BeOS legacy. Modern versions of vim use ../share/vim/vimNN/ to look for configuration files. I'm going to check the contents of this file, collect all that can be useful for Haiku and remove it completely in favor of standard configuration files. Do you have any objections?

For what we need that vi -> vim symlink introduced in http://dev.haiku-os.org/changeset/36082? Is vi still required by some other Haiku utils using it as default editor? In such case we have to fix those tools to using "nano" as default editor instead of adding dangling symlink on optional stuff. Frankly speaking - that was a main reason keeping vim in the Haiku tree - because nobody completely knows from where vi is still referenced. But you have opened this can of worms ;-) - and now it is required to find all refernces to "vi" and replace them with "nano". I think the "vi -> vim" symlink doesn't solve our problem properly.

in reply to:  4 comment:5 by mmadia, 14 years ago

Replying to siarzhuk:

[the copy of my comment from HaikuPort's Trac]

In my opinion - the vimrc in common/etc/vim is a BeOS legacy. Modern versions of vim use ../share/vim/vimNN/ to look for configuration files. I'm going to check the contents of this file, collect all that can be useful for Haiku and remove it completely in favor of standard configuration files. Do you have any objections?

For what we need that vi -> vim symlink introduced in http://dev.haiku-os.org/changeset/36082? Is vi still required by some other Haiku utils using it as default editor?

To be honest, I didn't realize that vimrc could be considered legacy or that vi -> vim may not be needed. (i'm more of an lpe fan) I figured moving those bits out of the default image and into the OptionalPackage file was at least a step in the right direction.

Grokking the sources for 'vi' shows that less, ncurses, readline, ctags, libs/edit have some notable references to 'vi'. For at least less, it still defaults to it.

in reply to:  4 comment:6 by jackburton, 14 years ago

Replying to siarzhuk:

For what we need that vi -> vim symlink introduced in http://dev.haiku-os.org/changeset/36082? Is vi still required by some other Haiku utils using it as default editor? In such case we have to fix those tools to using "nano" as default editor

AFAIK, posix mandates a "VISUAL" environment variable which should point to the default editor. So instead of hardcoding nano, we should just define VISUAL to the location of the nano binary, and use that environment variable in those tools which hardcode vi / vim as editor.

comment:7 by siarzhuk, 14 years ago

I have inspected mentioned data/etc/vim/vimrc file and think that it can be safely removed from the HaikuImage. It contains some mappings that were required to work with console vim in old BeOS "beterm" terminal. Haiku terminal support is more POSIX-compatible and default vimrc templates provided with Vim package for Haiku are OK. Most of other settings from this legacy data/etc/vim/vimrc are also exist in those templates. So I see no sense to keep this file in Haiku source tree. Also note that modern version of vim doesn't use any /etc/ directories to look for config files.

Last edited 10 years ago by mmadia (previous) (diff)

comment:8 by mmadia, 14 years ago

vimrc removed in hrev36753.

comment:9 by scottmc, 13 years ago

Resolution: fixed
Status: assignedclosed

This appears to have been fixed but wasn't closed? Fixed in hrev36753?

Note: See TracTickets for help on using tickets.