diff --git a/CHANGELOG.md b/CHANGELOG.md index ccbecf5..ec8962e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. - 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) ## [1.0] - 2016-01-06 First release! diff --git a/README.md b/README.md index 3a04f83..76d4391 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ #### [Tips](#tips-1) - [Saner behavior of n and N](#saner-behavior-of-n-and-n) +- [Quickly move current line](#quickly-move-current-line) #### [Debugging](#debugging-1) - [General tips](#general-tips) @@ -361,6 +362,15 @@ nnoremap n 'Nn'[v:searchforward].'zvzz' nnoremap N 'nN'[v:searchforward].'zvzz' ``` +#### Quickly move current line + +Sometimes I need a quick way to move the current line above or below: +```viml +nnoremap [e :execute 'move -1-'. v:count1 +nnoremap ]e :execute 'move +'. v:count1 +``` +These mappings also take a count, so `2]e` moves the current line 2 lines below. + ## Debugging #### General tips