Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th December 2010, 10:23 PM
Cuvou's Avatar
Cuvou Offline
Registered User
 
Join Date: Sep 2007
Location: Los Angeles, CA
Posts: 119
linuxchrome
vim on other OS's

Has anyone tried using vi/vim on a variety of other operating systems? The ones I've tried it on have a weird default configuration that makes them much more difficult to use than Fedora, and I wonder what the root cause of that is.

On Fedora I can open a file with vi, use arrow keys to move around, the "i" key enters insert mode and then I can go ahead and edit the file, escape, ":wq" and I'm done. But on a handful of other operating systems I've tried to use vi on, things never worked quite so well.

The OS's I had vi problems on were: a recent version of Ubuntu (maybe not 10.10 but a version before that), OpenSolaris, Arch Linux, and iirc I had trouble with OS X Leopard as well.

What happens on these OS's is... I open a file with vi, use the arrow keys to get to the line I want, hit "i" for insert mode and.... nothing happens? there's no "status bar" across the bottom of the terminal saying I'm in insert mode. So I try to type things, and the typing is weird (it only wants to write over top of existing text instead of inserting new text), so I use the arrow keys to try to move the cursor and fix it, and the arrow keys just start putting weird garbage characters like ^W or something in there. I never figure out what's wrong at this point or how to fix it, and I end up hitting escape a half dozen times and ":q!" to get out of the file without saving it, and then poke around for a different text editor (usually falling back to nano).

On Ubuntu the vim troubles were fixed by doing a "sudo apt-get install vim-common" or something along those lines. I didn't figure out how to fix vim on OpenSolaris, Arch Linux or OS X however. Arch Linux really caught me off guard though, because the installer asks you what text editor you'd like to use, and I picked vim, only to find out I couldn't edit any of the config files with it, and the setup tool wouldn't let me change my mind. I had to end up going to a terminal and edit the files by hand with nano instead.

Is it documented anywhere why vim acts so weird "by default" (I'm assuming it's by default, and that CentOS/Fedora ship the extra package that makes vim usable but other distros don't)?
__________________
~ Kirsle
Reply With Quote
  #2  
Old 15th December 2010, 10:47 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: vim on other OS's

Not weird - usually this is caused by incompatible interfaces with ncurses
libraries and curses libraries (solaris problems).

Some of the incompatibilities are caused by the .configure script - it
attempts to guess what configurations/systems you are on, and if they
aren't recognized will do a fallback to a basic configuration.

The lack of a status bar can be caused by ncurses incompatibilities,
for instance. If I remember right, his requires that the curses/ncurses
libraries support multiple regions - some do not, or only support one.

vim has to make a lot of assumptions about its operating environment
for terminal handling, and some of those are "not quite right" for some
systems. Especially when it comes to the fancier features. I think some
of the fallback assumptions are to drop to a basic vi environment that
does not have a lot of the extensions that vim contains.
Reply With Quote
  #3  
Old 16th December 2010, 05:47 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,617
linuxfedorafirefox
Re: vim on other OS's

Use emacs.
Reply With Quote
  #4  
Old 16th December 2010, 06:02 AM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxfirefox
Re: vim on other OS's

Don't know about the others, but the Arch install disc ships with a stripped down vim build that behaves much more like the vi of older UNIX variants. On most distros these days vi is a symlink to vim. After Arch is installed you can install the vim you're used to (either the vim package or gvim which is a meta-package that includes a command line build of vim). In other words the "weird" vi is only a feature of the Arch install disc.

I'm personally really used to the behavior of "modern" vim, and whenever I'm running an Arch install I always get bit by selecting vi.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #5  
Old 16th December 2010, 06:03 AM
JamesNZ's Avatar
JamesNZ Offline
Registered User
 
Join Date: Aug 2010
Location: Wellington, New Zealand
Age: 16
Posts: 889
windows_7chrome
Re: vim on other OS's

Quote:
Originally Posted by RupertPupkin View Post
Use emacs.
uh-oh, I see a flamewar coming. (I don't like vim either btw)
__________________
"For what is a man profited if he gains the whole world, but loses his own soul?"

- Jesus
Reply With Quote
  #6  
Old 16th December 2010, 06:08 AM
ElderSnake Offline
Registered User
 
Join Date: Nov 2010
Location: Australia
Posts: 684
freebsdunknown
Re: vim on other OS's

Sounds exactly like my recent experience with Vi on FreeBSD.

I had a cheatsheat for Vi sitting on my nearby laptop to help me out but it still did weird things, much like you describe. It was easy to make mistakes because typing and deleting letters didn't always work as expected.

Still, I struggled and managed with it until I managed to get a hold of good old nano. Though maybe I'm just really really bad with vi and I have much to learn, eh, I dunno. But Nano does what I need it to anyway.
__________________
OS': Arch Linux (KDE 4.10) - Fedora 17 (MATE) - Arch Linux (E17) - now Windows-free thanks Valve!
Reply With Quote
  #7  
Old 16th December 2010, 06:14 AM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxfirefox
Re: vim on other OS's

Quote:
Originally Posted by JamesNZ View Post
uh-oh, I see a flamewar coming. (I don't like vim either btw)
Why does it always seem like it's the emacs users who are picking the fight?
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #8  
Old 16th December 2010, 06:27 AM
linwhwylb Offline
Registered User
 
Join Date: Aug 2010
Posts: 24
linuxfedorafirefox
Re: vim on other OS's

That because the configuration files of vi or vim in other OS don't written properly or the profile you are used to.
In many OS,vi is just vi, in Fedora vi is alias vim, so when you type vi in Fedora you are in vim.We all know that vim is VI Improve and it has many features that vi doesn't.
Reply With Quote
Reply

Tags
vim

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How many OS's are too many? metatron Linux Chat 24 8th January 2009 04:27 PM
HP and Linux OS's ENDI1111 Using Fedora 9 29th September 2007 10:50 PM
How many OS's? glennzo Using Fedora 26 22nd December 2006 02:59 AM
Alternative OS's? JN4OldSchool Linux Chat 3 11th May 2006 09:22 PM
Can I have 3 OS's in one machine? kuthupandi Using Fedora 12 23rd July 2004 12:18 AM


Current GMT-time: 17:19 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat