mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-02-24 01:59:28 +08:00
Quirks: editing small files is slow
This commit is contained in:
parent
50cdf204d4
commit
756538ed47
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Tips: [Saner command-line history](README.md#saner-command-line-history)
|
||||
- Debugging: [Verbosity](README.md#verbosity)
|
||||
- Debugging: [Debugging Vim scripts](README.md#debugging-vim-scripts)
|
||||
- Quirks: [Editing small files is slow](README.md#editing-small-files-is-slow)
|
||||
- Quirks: [Editing huge files is slow](README.md#editing-huge-files-is-slow)
|
||||
- Miscellaneous: [Easter eggs](README.md#easter-eggs)
|
||||
|
||||
|
18
README.md
18
README.md
@ -60,6 +60,7 @@ added every day. Things about to be added can be found here:
|
||||
|
||||
#### [Quirks](#quirks-1)
|
||||
|
||||
- [Editing small files is slow](#editing-small-files-is-slow)
|
||||
- [Editing huge files is slow](#editing-huge-files-is-slow)
|
||||
- [Newline used for NUL](#newline-used-for-nul)
|
||||
- [Bracketed paste (or why do I have to set 'paste' all the time?)](#bracketed-paste-or-why-do-i-have-to-set-paste-all-the-time)
|
||||
@ -1047,6 +1048,23 @@ looking at some distributions:
|
||||
|
||||
## Quirks
|
||||
|
||||
#### Editing small files is slow
|
||||
|
||||
Most of the time this is caused by syntax files using complex regular
|
||||
expressions. Particulay the Ruby syntax file caused people to have slowdowns in
|
||||
the past. (Also see [Debugging syntax files](#debugging-syntax-files).)
|
||||
|
||||
Moreover, some features tend to impact performance more than others. Check this
|
||||
list to ease slowdowns:
|
||||
|
||||
| Option | Why? |
|
||||
|--------|------|
|
||||
| `:set nocursorline` | This makes screen redrawing quite a bit slower. |
|
||||
| `:set norelativenumber` | Constantly computing the relative numbers is expensive. |
|
||||
| `:set foldmethod=marker` | If the syntax file itself is slow already, `foldmethod=syntax` makes it even worse. |
|
||||
| `:set synmaxcol=200` | Due to internal representation, Vim has problems with long lines in general. Only syntax highlight till column 200. |
|
||||
| `:NoMatchParen` | Uses regular expressions to find the accompanying parenthesis. |
|
||||
|
||||
#### Editing huge files is slow
|
||||
|
||||
The biggest issue with big files is, that Vim reads the whole file at once. This
|
||||
|
Loading…
x
Reference in New Issue
Block a user