LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags

Reply
 
Thread Tools
Old 02-26-2009, 10:23 PM   #1
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 34
Thanked: 3
vim slow writing process


[Log in to get rid of this advertisement]
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!
crs_zxf is offline  
Tag This Post
Reply With Quote
Old 02-27-2009, 10:14 AM   #2
TB0ne
Senior Member
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, Mandrake, RedHat, Gentoo, Slack
Posts: 4,073
Thanked: 143
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.
TB0ne is offline     Reply With Quote
Old 02-27-2009, 11:26 PM   #3
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 34
Thanked: 3

Original Poster
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.
crs_zxf is offline     Reply With Quote
Old 03-02-2009, 12:11 AM   #4
crs_zxf
Member
 
Registered: Oct 2008
Distribution: Arch Linux
Posts: 34
Thanked: 3

Original Poster
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-02-2009 at 12:12 AM..
crs_zxf is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 12:52 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration