After this change we never release blocks from memory (in practice it
never happened because the memory limits are never reached). Let the OS
take care of that.
---
On today's systems the 'maxmem' and 'maxmemtot' values are huge (4+ GB)
so the limits are never reached in practice, but Vim wastes a lot of
time checking if the limit was reached.
If the limit is reached Vim starts saving pieces of the swap file that were in
memory to the disk. Said in a different way: Vim implements its own
memory-paging mechanism. This is unnecessary and inefficient since the
operating system already has virtual memory and will swap to the disk if
programs start using too much memory.
This change does...
1. Reduce the number of config options and need for documentation.
2. Make the code more efficient as we don't have to keep track of memory
usage nor check if the memory limits were reached to start swapping
to disk every time we need memory for buffers.
3. Simplify the code. Once memfile.c is simple enough it could be
replaced by actual operating system memory mapping (mmap,
MemoryViewOfFile...). This change does not prevent Vim to recover
changes from swap files since the swapping code is never triggered
with the huge limits set by default.
> The option 'maxmem' ('mm') is used to set the maximum memory used for one
> buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for
> all buffers (in kilobytes). The defaults depend on the system used. These
> are not hard limits, but tell Vim when to move text into a swap file. If you
> don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a very large
> value. The swap file will then only be used for recovery. If you don't want
> a swap file at all, set 'updatecount' to 0, or use the "-n" argument when
> starting Vim.
On today's systems these values are huge (4GB in my machine with 8GB of RAM
since it's set as half the available memory by default) so the limits are
never reached in practice, but Vim wastes a lot of time checking if the limit
was reached.
If the limit is reached Vim starts saving pieces of the swap file that were in
memory to the disk. Said in a different way: Vim implements its own memory
swapping mechanism. This is unnecessary and inefficient since the operating
system already virtualized the memory and will swap to the disk if programs
start using too much memory.
This change does...
1. Reduce the number of config options and need for documentation.
2. Make the code more efficient as we don't have to keep track of memory usage
nor check if the memory limits were reached to start swapping to disk every
time we need memory for buffers.
3. Simplify the code. Once `memfile.c` is simple enough it could be replaced by
actual operating system memory mapping (`mmap`, `MemoryViewOfFile`...).
This change does not prevent Vim to recover changes from swap files since the
swapping code is never triggered with the huge limits set by default.
Update runtime files.
38a55639d6
Ignore changes to
* doc/channel.txt, doc/eval.txt, doc/various.txt: Channel related docs
* doc/tags: Generated at build time
* doc/todo.txt, doc/vi_diff.txt: Not relevant to neovim
Updated runtime files.
b4ff518d95
Missing files: runtime/doc/tags, runtime/doc/todo.txt. Changes to
runtime/doc/if_pyth.txt, runtime/doc/options.txt and runtime/doc/quickref.txt
did not aply. Excluded runtime/syntax/vim.vim.
We do not support every Unix flavor in existence so note
that here.
We do not support Windows 95 or NT. Update the list to
the Windows versions we do support.
We only support OS X not classic Mac OS so note that too.
All `{not in Vi}' tags have been removed, so the first sentence is no
longer true. As for the second sentence, the header ("Differences
between Vim and Vi") is already self-explanatory, so it can be removed
as well.
These are more like notes than proper documentation, so remove it as
they're not of much use unless you don't know what you're looking for.
Many of these are somewhat useful, but many also duplicate what's
already documented elsewhere. In any case, vi_diff.txt is the last
place that assorted tips'n'tricks should be located (we already have
tips.txt!!!).
In regards to Nvim, it's very outdated; for an updated list of such
arguments refer to the manual page or `nvim --help`. In all other
regards, it's of little to no use to end-users.
From the documentation itself:
:[range]o[pen] Works like |:visual|: end Ex mode.
{Vi: start editing in open mode}
...
Vim does not support open mode, since it's not really useful. For
those situations where ":open" would start open mode Vim will leave Ex
mode, which allows executing the same commands, but updates the whole
screen instead of only one line.
Part of the reason behind this is to make removing vi_diff.txt easier,
although it's also because :open is not too useful.
Helped-by: @fdinoff
Helped-by: @dsummersl
Helped-by: @mhinz
Helped-by: @justinmk
- CPO_ALL and CPO_VI are identical, so merge them
- No longer check for the environment variable 'VIM_POSIX'
- In vim_diff.txt, mention the removal of 'cpoptions' flags
These options were never implemented in Vim. They are documented under
|missing-options| in runtime/doc/vi_diff.txt:
'autoprint'
'beautify'
'flash'
'graphic'
'hardtabs'
'mesg'
'novice'
'open'
'optimize'
'redraw'
'slowopen'
'sourceany'
'w300'
'w1200'
'w9600'
References #2548.
Regarding |script-here|: despite being a language agnostic piece of
advice, it was in `if_perl.txt`. Regardless, we now only have one
support for one legacy plugin interface, so put it in `if_pyth.txt`
This removes the ability to start nvim via the following aliases in
favor of just using their command line arguments:
ex vim -e
exim vim -E
view vim -R
gvim vim -g
gex vim -eg
gview vim -Rg
rvim vim -Z
rview vim -RZ
rgvim vim -gZ
rgview vim -RgZ
This also removes Vi mode (-v) for consistency. From ':help -v':
-v Start Ex in Vi mode. Only makes a difference when the
executable is called "ex" or "gvim". For gvim the GUI is not
started if possible.
Notes regarding the removal of specific items:
- Aztec C: only on the Amiga.
- mch_check_win(): doesn't exist anymore.
- Comment in ex_cmds.c: It seems the context for this comment was
removed, but the comment was inadvertantly left alone.
Closes https://github.com/neovim/docs/pull/26
Also added stubs for 'cryptmethod' and 'key', and placeholders for
explanation regarding removal of crypto functionality.
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7
Excluding:
Amiga icons (*.info, icons/)
doc/hangulin.txt
tutor/
spell/
lang/ (only used for menu translations)
macros/maze/, macros/hanoi/, macros/life/, macros/urm/
These were used to test vi compatibility.
termcap
"Demonstration of a termcap file (for the Amiga and Archimedes)"
Helped-by: Rich Wareham <rjw57@cam.ac.uk>
Helped-by: John <john.schmidt.h@gmail.com>
Helped-by: Yann <yann@yann-salaun.com>
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com>
Helped-by: drasill <github@tof2k.com>
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com>
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>