mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-04-28 23:29:27 +08:00
Merge 528ee8d0b7ab9b45f62ce381ffbf2f464a7dba9b into a5f0b9da0d1203f489f71988f8882c31b7e77257
This commit is contained in:
commit
0a92110c2b
23
README.md
23
README.md
@ -82,7 +82,7 @@
|
|||||||
- [Saner command-line history](#saner-command-line-history)
|
- [Saner command-line history](#saner-command-line-history)
|
||||||
- [Saner CTRL-L](#saner-ctrl-l)
|
- [Saner CTRL-L](#saner-ctrl-l)
|
||||||
- [Disable audible and visual bells](#disable-audible-and-visual-bells)
|
- [Disable audible and visual bells](#disable-audible-and-visual-bells)
|
||||||
- [Quickly move current line](#quickly-move-current-line)
|
- [Quickly move current line, multiples lines](#quickly-move-current-line-multiple-lines)
|
||||||
- [Quickly add empty lines](#quickly-add-empty-lines)
|
- [Quickly add empty lines](#quickly-add-empty-lines)
|
||||||
- [Quickly edit your macros](#quickly-edit-your-macros)
|
- [Quickly edit your macros](#quickly-edit-your-macros)
|
||||||
- [Quickly jump to header or source file](#quickly-jump-to-header-or-source-file)
|
- [Quickly jump to header or source file](#quickly-jump-to-header-or-source-file)
|
||||||
@ -1981,7 +1981,7 @@ set t_vb=
|
|||||||
|
|
||||||
See [Vim Wiki: Disable beeping](http://vim.wikia.com/wiki/Disable_beeping).
|
See [Vim Wiki: Disable beeping](http://vim.wikia.com/wiki/Disable_beeping).
|
||||||
|
|
||||||
## Quickly move current line
|
## Quickly move current line, multiple lines
|
||||||
|
|
||||||
Sometimes I need a quick way to move the current line above or below:
|
Sometimes I need a quick way to move the current line above or below:
|
||||||
|
|
||||||
@ -1992,6 +1992,25 @@ nnoremap ]e :<c-u>execute 'move +'. v:count1<cr>
|
|||||||
|
|
||||||
These mappings also take a count, so `2]e` moves the current line 2 lines below.
|
These mappings also take a count, so `2]e` moves the current line 2 lines below.
|
||||||
|
|
||||||
|
You can also try out [Vim Move](https://github.com/matze/vim-move) which provides similar functionalities that allow move curren line as well as multiples lines with custom mappings:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Disable Vim Move default mappings
|
||||||
|
let g:move_map_keys = 0
|
||||||
|
|
||||||
|
" Move current line up with Shift-K
|
||||||
|
nmap <S-k> <Plug>MoveLineUp
|
||||||
|
|
||||||
|
" Move current line down with Shift-J
|
||||||
|
nmap <S-j> <Plug>MoveLineDown
|
||||||
|
|
||||||
|
" Move a block of code up with Shift K
|
||||||
|
vmap <S-k> <Plug>MoveBlockUp
|
||||||
|
|
||||||
|
" Move a block of code down with Shift J
|
||||||
|
vmap <S-j> <Plug>MoveBlockDown
|
||||||
|
```
|
||||||
|
|
||||||
## Quickly add empty lines
|
## Quickly add empty lines
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user