aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/vertical_region.txt47
-rw-r--r--plugin/vertical_region.vim12
2 files changed, 21 insertions, 38 deletions
diff --git a/doc/vertical_region.txt b/doc/vertical_region.txt
index cc07b5d..892d8be 100644
--- a/doc/vertical_region.txt
+++ b/doc/vertical_region.txt
@@ -13,44 +13,27 @@ This plugin only loads if 'compatible' is not set.
MAPPINGS *vertical_region-mappings*
-Six mappings are provided:
+Two mapping targets are provided. They can be mapped in normal,
+operator-pending, and visual mode, and accept a [count] prefix to move by more
+than one matching line.
- *<Plug>(VerticalRegionUpNormal)*
-`<Plug>(VerticalRegionUpNormal)` moves up to the previous line with non-space
-characters before or in the current column, in normal mode.
+ *<Plug>(VerticalRegionUp)*
+`<Plug>(VerticalRegionUp)` moves up to the previous line with non-space
+characters before or in the current column.
- *<Plug>(VerticalRegionDownNormal)*
-`<Plug>(VerticalRegionDownNormal)` moves down to the next line with non-space
-characters before or in the current column, in normal mode.
-
- *<Plug>(VerticalRegionUpOperator)*
-`<Plug>(VerticalRegionUpOperator)` moves up to the previous line with
-non-space characters before or in the current column, in visual mode.
-
- *<Plug>(VerticalRegionDownOperator)*
-`<Plug>(VerticalRegionDownOperator)` moves down to the next line with
-non-space characters before or in the current column, in operating-pending
-mode.
-
- *<Plug>(VerticalRegionUpVisual)*
-`<Plug>(VerticalRegionUpVisual)` moves up to the previous line with non-space
-characters before or in the current column, in visual mode.
-
- *<Plug>(VerticalRegionDownVisual)*
-`<Plug>(VerticalRegionDownVisual)` moves down to the next line with non-space
-characters before or in the current column, in visual mode.
-
-All of them accept a [count] prefix to move by more than one matching line.
+ *<Plug>(VerticalRegionDown)*
+`<Plug>(VerticalRegionDown)` moves down to the previous line with non-space
+characters before or in the current column.
There are no default key mappings; you should define those yourself in your
|vimrc|. Here are the author's choices, using \{ and \} in all three modes:
>
- nmap <Bslash>{ <Plug>(VerticalRegionUpNormal)
- nmap <Bslash>} <Plug>(VerticalRegionDownNormal)
- omap <Bslash>{ <Plug>(VerticalRegionUpOperator)
- omap <Bslash>} <Plug>(VerticalRegionDownOperator)
- xmap <Bslash>{ <Plug>(VerticalRegionUpVisual)
- xmap <Bslash>} <Plug>(VerticalRegionDownVisual)
+ nmap <Bslash>{ <Plug>(VerticalRegionUp)
+ nmap <Bslash>} <Plug>(VerticalRegionDown)
+ omap <Bslash>{ <Plug>(VerticalRegionUp)
+ omap <Bslash>} <Plug>(VerticalRegionDown)
+ xmap <Bslash>{ <Plug>(VerticalRegionUp)
+ xmap <Bslash>} <Plug>(VerticalRegionDown)
<
AUTHOR *vertical_region-author*
diff --git a/plugin/vertical_region.vim b/plugin/vertical_region.vim
index e54bbb0..c1fc56f 100644
--- a/plugin/vertical_region.vim
+++ b/plugin/vertical_region.vim
@@ -16,15 +16,15 @@ endif
let g:loaded_vertical_region = 1
" Define plugin maps
-nnoremap <silent> <Plug>(VerticalRegionUpNormal)
+nnoremap <silent> <Plug>(VerticalRegionUp)
\ :<C-U>call vertical_region#Map(v:count1, 1, 'n')<CR>
-nnoremap <silent> <Plug>(VerticalRegionDownNormal)
+nnoremap <silent> <Plug>(VerticalRegionDown)
\ :<C-U>call vertical_region#Map(v:count1, 0, 'n')<CR>
-onoremap <silent> <Plug>(VerticalRegionUpOperator)
+onoremap <silent> <Plug>(VerticalRegionUp)
\ :<C-U>call vertical_region#Map(v:count1, 1, 'o')<CR>
-onoremap <silent> <Plug>(VerticalRegionDownOperator)
+onoremap <silent> <Plug>(VerticalRegionDown)
\ :<C-U>call vertical_region#Map(v:count1, 0, 'o')<CR>
-xnoremap <silent> <Plug>(VerticalRegionUpVisual)
+xnoremap <silent> <Plug>(VerticalRegionUp)
\ :<C-U>call vertical_region#Map(v:count1, 1, 'x')<CR>
-xnoremap <silent> <Plug>(VerticalRegionDownVisual)
+xnoremap <silent> <Plug>(VerticalRegionDown)
\ :<C-U>call vertical_region#Map(v:count1, 0, 'x')<CR>