From fb106dae8125a20c9256192adf97d1b238806a4e Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 12 Jan 2016 21:12:23 +0100 Subject: [PATCH] Commands: :redir --- CHANGELOG.md | 1 + README.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6414b5..432ca8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index c34e06b..3eee2f9 100644 --- a/README.md +++ b/README.md @@ -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