mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-02-23 17:49:28 +08:00
Debugging: verbosity
This commit is contained in:
parent
d2b795a6f7
commit
77ac08ea92
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Debugging: [Verbosity](README.md#verbosity)
|
||||
|
||||
## [1.1] - 2016-01-07
|
||||
|
||||
### Added
|
||||
|
43
README.md
43
README.md
@ -48,6 +48,7 @@ added every day. Things about to be added can be found here:
|
||||
- [General tips](#general-tips)
|
||||
- [Profiling startup time](#profiling-startup-time)
|
||||
- [Profiling at runtime](#profiling-at-runtime)
|
||||
- [Verbosity](#verbosity)
|
||||
|
||||
#### [Miscellaneous](#miscellaneous-1)
|
||||
|
||||
@ -834,6 +835,48 @@ two different sections `FUNCTIONS SORTED ON TOTAL TIME` and `FUNCTIONS SORTED ON
|
||||
SELF TIME` that are worth gold. On a quick glance you can see, if a certain
|
||||
function is taking too long.
|
||||
|
||||
#### Verbosity
|
||||
|
||||
Another useful way for observing what Vim is currently doing is increasing the
|
||||
verbosity level. Currently Vim supports 9 different levels. See `:h 'verbose'`
|
||||
for the full list.
|
||||
|
||||
```viml
|
||||
:e /tmp/foo
|
||||
:set verbose=2
|
||||
:w
|
||||
:set verbose=0
|
||||
```
|
||||
|
||||
This would show all the files that get sourced, e.g. the undo file or various
|
||||
plugins that act on saving.
|
||||
|
||||
If you only want increase verbosity for a single command, there's also
|
||||
`:verbose`, which simply gets put in front of any other command. It takes the
|
||||
verbosity level as count and defaults to 1:
|
||||
|
||||
```viml
|
||||
:verb set verbose
|
||||
" verbose=1
|
||||
:10verb set verbose
|
||||
" verbose=10
|
||||
```
|
||||
|
||||
It's very often used with its default verbosity level 1 to show where an option
|
||||
was set last:
|
||||
|
||||
```viml
|
||||
:verb set ai?
|
||||
" Last set from ~/.vim/vimrc
|
||||
```
|
||||
|
||||
Naturally, the higher the verbosity level the more overwhelming the output. But
|
||||
fear no more, you can simply redirect the output to a file:
|
||||
|
||||
```viml
|
||||
:set verbosefile=/tmp/foo | 15verbose echo "foo" | vsplit /tmp/foo
|
||||
```
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
#### Vim distributions
|
||||
|
Loading…
x
Reference in New Issue
Block a user