Commands: :redir

This commit is contained in:
Marco Hinz 2016-01-12 21:12:23 +01:00
parent a82ec433bc
commit fb106dae81
2 changed files with 25 additions and 0 deletions

View File

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
- Basics: [Changelist? Jumplist?](README.md#changelist-jumplist)
- Basics: [Sessions?](README.md#sessions)
- Basics: [Folding?](README.md#folding)
- Commands: [:redir](README.md#redir)
- Tips: [Saner command-line history](README.md#saner-command-line-history)
- Usage: [Editing remote files](README.md#editing-remote-files)
- Usage: [Restore cursor position when opening file](README.md#restore-cursor-position-when-opening-file)

View File

@ -56,6 +56,10 @@ added every day. Things about to be added can be found here:
- [Change cursor style in insert mode](#change-cursor-style-in-insert-mode)
- [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards)
#### [Commands](#commands-1)
- [:redir](#redir) - Redirect messages.
#### [Debugging](#debugging-1)
- [General tips](#general-tips)
@ -1114,6 +1118,26 @@ Now you can use `>>>>>` on your visual selection without any problems.
**NOTE**: The same can be achieved using `.`, which repeats the last change.
## Commands
Useful commands that are good to know.
#### :redir
Many commands print messages and `:redir` allows to redirect that output. You
can redirect to files, [registers](#registers) or variables.
```viml
:redir => neatvar
:reg
:redir END
:echo neatvar
:" For fun let's also put it onto the current buffer.
:put =nicevar
```
Related help: `:h :redir`
## Debugging
#### General tips