LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-26-2009, 09:23 PM   #1
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 37

Rep: Reputation: 17
vim slow writing process


each time I use ":w" in vim to save a file, I always need to wait for a few seconds, especially the first time I run ":w", this is boring, I wonder if there's a way to speed up writing process in Vim? Thanks!
 
Old 02-27-2009, 09:14 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by crs_zxf View Post
each time I use ":w" in vim to save a file, I always need to wait for a few seconds, especially the first time I run ":w", this is boring, I wonder if there's a way to speed up writing process in Vim? Thanks!
No, and write/save times depend on how big the file is, and what's going on, on the disk you're writing to.
 
Old 02-27-2009, 10:26 PM   #3
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 37

Original Poster
Rep: Reputation: 17
In fact, even a file containing only one character takes a few seconds to save, so I wonder if there is a method like synchronizing the writing process so that I don't need to wait until the process completes.
 
Old 03-01-2009, 11:11 PM   #4
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 37

Original Poster
Rep: Reputation: 17
finally, I found out the cause of my vim's slow saving, by default, vim will make a backup of the currently editing file every time you invoke ":w", this will slow the save process prominently (at least in my case), so I add the following code to my .vimrc

Code:
 set nobackup
now the save process completes instantly. Great !!!

Last edited by crs_zxf; 03-01-2009 at 11:12 PM.
 
Old 08-16-2016, 04:23 AM   #5
getgoodgrade
LQ Newbie
 
Registered: Aug 2016
Location: New York
Posts: 16

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by crs_zxf View Post
finally, I found out the cause of my vim's slow saving, by default, vim will make a backup of the currently editing file every time you invoke ":w", this will slow the save process prominently (at least in my case), so I add the following code to my .vimrc

Code:
 set nobackup
now the save process completes instantly. Great !!!
Thanks! Made the same up, and it helped!
 
  


Reply

Tags
vim



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
Which Process is writing to log file ZAMO Linux - General 4 08-17-2016 09:54 PM
vim slow editing php files in ubuntu exodist Linux - Software 5 05-17-2008 02:18 PM
Exec Process by Writing to a File? jlward4th Linux - General 1 03-29-2008 07:52 AM
Writing a server process flobadob Linux - General 3 10-28-2006 01:59 PM
writing to child process stdin avikosan Programming 2 11-11-2003 07:06 PM

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

All times are GMT -5. The time now is 07:06 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