diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f89dd..bb6778a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,14 @@ All notable changes to this project will be documented in this file. ### Added - Basics: [Quickfix and location lists?](README.md#quickfix-and-location-lists) - - Quirks: [Newline used for NUL](README.md#newline-used-for-nul) - - Plugins: [New section "Commenters"](README.md#commenters) - Plugins: [New section "Misc"](README.md#misc) - Plugins: [New section "Tmux"](README.md#tmux) - - Tips: [Saner behavior of n and N](README.md#saner-behavior-of-n-and-n) - Tips: [Quickly move current line](README.md#quickly-move-current-line) - Tips: [Quickly add empty lines](README.md#quickly-add-empty-lines) +- Tips: [Don't lose selection when shifting sidewards](README.md#dont-lose-selection-when-shifting-sidewards) ## [1.0] - 2016-01-06 First release! diff --git a/README.md b/README.md index 4f2b4df..3ef315b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [Saner behavior of n and N](#saner-behavior-of-n-and-n) - [Quickly move current line](#quickly-move-current-line) - [Quickly add empty lines](#quickly-add-empty-lines) +- [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards) #### [Debugging](#debugging-1) - [General tips](#general-tips) @@ -381,6 +382,19 @@ nnoremap [ :put! ='' nnoremap ] :put ='' ``` +#### Don't lose selection when shifting sidewards + +If you select one or more lines, you can use `<` and `>` for shifting them +sidewards. Unfortunately you immediately lose the selection afterwards. + +You can use `gv` to reselect the last selection (see `:h gv`), thus you can work +around it like this: +```viml +xnoremap < >gv +``` +Now you can use `>>>>>` on your visual selection without any problems. + ## Debugging #### General tips