Quantcast

Can VIM load big files quicker?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can VIM load big files quicker?

葛布林
Hi all,
I have a text file with more than 40,000,000 lines. It takes VIM very long time to load. Is there anything I can do to make it quicker?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can VIM load big files quicker?

Ben Schmidt
On 1/02/11 10:52 PM, Wayne Young wrote:
> Hi all,
> I have a text file with more than 40,000,000 lines. It takes VIM very long time to
> load. Is there anything I can do to make it quicker?

Check out the LargeFile.vim plugin.

Ben.



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can VIM load big files quicker?

Tim Chase
In reply to this post by 葛布林
On 02/01/11 05:52, Wayne Young wrote:
> I have a text file with more than 40,000,000 lines. It takes
> VIM very long time to load. Is there anything I can do to make
> it quicker?

You may want to investigate the common large-file solutions:

http://www.vim.org/scripts/script.php?script_id=1506
http://vim.wikia.com/wiki/Faster_loading_of_large_files

Depending on your edits, you might have better luck using sed
which will process it as a stream instead of trying to hold the
whole thing in memory.  You might also want to read at

   :help limits

for limitations you might bump into with files that large.

Additionally, with a file that large, it might be useful (if
you're on *nix or have common *nix-utilities on Win32) to use the
split/csplit commands to chop up your file into manageable bits
to edit subsets of them, and then piece them all back together
with cat.

Hope this helps,

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Loading...