mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-02-24 01:59:28 +08:00
Tips: don't lose selection when shifting sidewards
This commit is contained in:
parent
feb724995f
commit
906a2f4344
@ -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!
|
||||
|
14
README.md
14
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 [<space> :put! =''<cr>
|
||||
nnoremap ]<space> :put =''<cr>
|
||||
```
|
||||
|
||||
#### 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
|
||||
xnoremap > >gv
|
||||
```
|
||||
Now you can use `>>>>>` on your visual selection without any problems.
|
||||
|
||||
## Debugging
|
||||
|
||||
#### General tips
|
||||
|
Loading…
x
Reference in New Issue
Block a user