summaryrefslogtreecommitdiff
path: root/plugin/warp.vim
blob: 95391a1ba89ca0a54b8211db595295d4cf581c47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
" Uses a strategy that allows the user to select an arbitrary line and column by
" using 2x2 key strokes. Is more complex, but most powerful.
command! WarpFull lua require('warp').run(require('warp.col_selectors.grid').grid_strategy, require('warp.win_selectors.prompt'))

" Uses a strategy that allows the user to select an arbitrary line and column by
" using 2x2 key strokes. Is more complex, but most powerful.
command! WarpGrid lua require('warp').run(require('warp.col_selectors.grid').grid_strategy)

" Has the user select the column based on nows.
command! WarpWords lua require('warp').run(require('warp.col_selectors.words').words_strategy)

" Warps to the line and leaves the cursor on the current line.
command! WarpLine lua require('warp').run(require('warp.col_selectors.null').null_strategy)

noremap <Plug>(warp-grid) <cmd>WarpGrid<cr>
noremap <Plug>(warp-words) <cmd>WarpWords<cr>
noremap <Plug>(warp-line) <cmd>WarpLine<cr>

onoremap v<Plug>(warp-grid) <cmd>WarpGrid<cr>
onoremap v<Plug>(warp-words) <cmd>WarpWords<cr>
onoremap v<Plug>(warp-line) <cmd>WarpLine<cr>