summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-10 23:59:43 -0600
committerJosh Rahm <joshuarahm@gmail.com>2024-03-10 23:59:43 -0600
commit38356c4b980f70d498e211ef686d4d6a6c003dc1 (patch)
tree990db70b37c90e340ce983503d23c0fd628a69aa /plugin
parent183241c17a246ab97c60f78bbd4adc6b40cc9016 (diff)
downloadnvim-warp-38356c4b980f70d498e211ef686d4d6a6c003dc1.tar.gz
nvim-warp-38356c4b980f70d498e211ef686d4d6a6c003dc1.tar.bz2
nvim-warp-38356c4b980f70d498e211ef686d4d6a6c003dc1.zip
default -> grid strategy.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/warp.vim16
1 files changed, 15 insertions, 1 deletions
diff --git a/plugin/warp.vim b/plugin/warp.vim
index 2190d31..4052622 100644
--- a/plugin/warp.vim
+++ b/plugin/warp.vim
@@ -1,3 +1,17 @@
-command! WarpGrid lua require('warp').run(require('warp.strategy.default').default_strategy)
+" 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.strategy.grid').grid_strategy)
+
+" Has the user select the column based on nows.
command! WarpWords lua require('warp').run(require('warp.strategy.words').words_strategy)
+
+" Warps to the line and leaves the cursor on the current line.
command! WarpLine lua require('warp').run(require('warp.strategy.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>