Re: Will vim copy all file content to memory when i open a file?

2018-02-15 Thread Lifepillar
On 15/02/2018 00:31, Tony Mechelynck wrote: On Thu, Feb 15, 2018 at 12:28 AM, Tony Mechelynck wrote: On Tue, Feb 13, 2018 at 9:49 PM, Lifepillar wrote: [...] In my system (macOS and Vim 8.0.1500), if I run `vim --clean` repeatedly, both

Re: Will vim copy all file content to memory when i open a file?

2018-02-14 Thread Christian Brabandt
On Do, 15 Feb 2018, Tony Mechelynck wrote: > On Tue, Feb 13, 2018 at 9:49 PM, Lifepillar wrote: > [...] > > In my system (macOS and Vim 8.0.1500), if I run `vim --clean` > > repeatedly, both maxmem and maxmemtot are set to the same huge value, which > > changes at

Re: Will vim copy all file content to memory when i open a file?

2018-02-14 Thread Tony Mechelynck
On Thu, Feb 15, 2018 at 12:28 AM, Tony Mechelynck wrote: > On Tue, Feb 13, 2018 at 9:49 PM, Lifepillar wrote: > [...] >> In my system (macOS and Vim 8.0.1500), if I run `vim --clean` >> repeatedly, both maxmem and maxmemtot are set to the

Re: Will vim copy all file content to memory when i open a file?

2018-02-14 Thread Tony Mechelynck
On Tue, Feb 13, 2018 at 9:49 PM, Lifepillar wrote: [...] > In my system (macOS and Vim 8.0.1500), if I run `vim --clean` > repeatedly, both maxmem and maxmemtot are set to the same huge value, which > changes at every run, such as 9007199253926612 or > 9007199253919906.

Re: Will vim copy all file content to memory when i open a file?

2018-02-13 Thread Lifepillar
On 12/02/2018 20:58, Bram Moolenaar wrote: Zhigang Song wrote: Will vim copy all file content to memory when I open a file? Vim will read the file, mainly to count the number of lines, so you can do "1234G". Not all of the file is kept in memory, especially if it's a big file. Check out

Re: Will vim copy all file content to memory when i open a file?

2018-02-13 Thread Lifepillar
On 13/02/2018 03:15, Tony Mechelynck wrote: On Tue, Feb 13, 2018 at 2:41 AM, Matt Ackeret wrote: On Sun, 11 Feb 2018, Zhigang Song wrote: Will vim copy all file content to memory when I open a file? No, that's why vim is fast opening gigantic files. However, unlike sed,

Re: Will vim copy all file content to memory when i open a file?

2018-02-12 Thread Tony Mechelynck
On Tue, Feb 13, 2018 at 2:41 AM, Matt Ackeret wrote: > On Sun, 11 Feb 2018, Zhigang Song wrote: >>Will vim copy all file content to memory when I open a file? > > No, that's why vim is fast opening gigantic files. However, unlike sed, Vim is not a stream editor (i.e. an editor

Re: Will vim copy all file content to memory when i open a file?

2018-02-12 Thread Matt Ackeret
On Sun, 11 Feb 2018, Zhigang Song wrote: >Will vim copy all file content to memory when I open a file? No, that's why vim is fast opening gigantic files. -- -- 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

Re: Will vim copy all file content to memory when i open a file?

2018-02-12 Thread Bram Moolenaar
Zhigang Song wrote: > Will vim copy all file content to memory when I open a file? Vim will read the file, mainly to count the number of lines, so you can do "1234G". Not all of the file is kept in memory, especially if it's a big file. Check out the 'maxmem' and 'maxmemtot' options. -- I'm

Re: Will vim copy all file content to memory when i open a file?

2018-02-12 Thread Shlomi Fish
On Sun, 11 Feb 2018 18:09:02 +0800 Zhigang Song wrote: > Will vim copy all file content to memory when I open a file? > opening this file in vim: -rw-r--r-- 1 shlomif shlomif 608170649 Feb 12 12:19 Total-Imp3.txt