LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-22-2015, 04:49 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Vi and Vim.


Hi: I have a text file (plain ASCII) of 5MB size. If I open it with vi,
make some modification and save it, 10 seconds at least elapse before
I am given the prompt again. But if I do the same with vim, it takes under 1 second to save the file. What can be the cause of such a notable difference?
 
Old 06-22-2015, 08:15 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,968
Blog Entries: 28

Rep: Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063
This Stack Exchange thread seems to bear on your question. Apparently it has to do with how the two programs handle the their tmp files prior to and during saving.

A web search for "vi vim large files" turns up a number of other links that seem relevant.
 
1 members found this post helpful.
Old 06-22-2015, 09:57 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,771

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
I guess it could do with how the two were compiled. vi version you have may be very very old while the vim quite new. (dunno, wild guessing here) Although vi should be pure C and quite small. It simply may not address modern hardware well on your system.

Open top command and see if you notice anything on this. I'd too agree that swap file and access to various mounts and such could cause an issue.

vim info. http://www.vim.org/6k/features.en.txt


I'd assume that vi on slack is really vi and not a link to vim. Oops.
http://www.slackbook.org/html/vi.html

"

On Slackware Linux, the default version of vi available is elvis. Other versions - including vim and gvim - are available if you've installed the proper packages. gvim is an X Window version of vim that includes toolbars, detachable menus, and dialog boxes."

Last edited by jefro; 06-22-2015 at 10:23 PM.
 
Old 06-23-2015, 08:56 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,968
Blog Entries: 28

Rep: Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063
Yes, indeedy-do, Slackware includes both vi and vim. They are very definitely two distinct programs. If you dig hard enough in Slackware, you'll probably find a that kitchen sink.

Other distros I've hopped, Mageia for one, aliases vi to vim, so that, when you type "vi," you get "vim."
 
Old 06-24-2015, 02:30 AM   #5
xuhdev
LQ Newbie
 
Registered: Jun 2015
Distribution: CentOS,Debian,Ubuntu
Posts: 19

Rep: Reputation: Disabled
On some distros, you have vi and vim from different source code. But on RedHat, Debian (by default) you have vi from the Vim source code but with a tiny or small build configuration, while vim gives a bigger version.
 
Old 06-24-2015, 04:01 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,771

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
http://www.slackbook.org/html/vi.html

"

On Slackware Linux, the default version of vi available is elvis. Other versions - including vim and gvim - are available if you've installed the proper packages. gvim is an X Window version of vim that includes toolbars, detachable menus, and dialog boxes."
 
  


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
[SOLVED] Fedora shows 'man vim' but when execute 'vim' got "bash: vim: command not found..." ? flash_os Linux - Newbie 19 01-03-2015 11:56 PM
vim tutorial in 5 minute, learn vi/vim is to know what the letters stand for cheats anish2good Linux - Newbie 1 07-16-2013 12:23 PM
LXer: Personalize and Optimize Vim editor using Packtís new Vim 7.2 book LXer Syndicated Linux News 0 05-20-2010 10:20 PM
Switching from vim to vim -g from inside vim iDragoon Linux - Software 4 05-15-2009 11:46 AM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:12 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
Open Source Consulting | Domain Registration