sbeyer / neovim-config

My configuration for neovim
3 stars 0 forks source link

Fancy speedy/easy motions #29

Closed sbeyer closed 1 year ago

sbeyer commented 3 years ago

Try these and choose one:

sbeyer commented 2 years ago

I have used lightspeed for a while. Now I am using nothing. Many people use hop. Check later again.

sbeyer commented 1 year ago

seems to be cool: https://github.com/rlane/pounce.nvim

diff --git a/mappings.lua b/mappings.lua
index cbbee31..fcf786d 100644
--- a/mappings.lua
+++ b/mappings.lua
@@ -11,5 +11,22 @@ return {
       "<cmd>!git rm -f %<cr>",
       desc = "git rm current file"
     },
+
+    ["s"] = {
+      "<cmd>Pounce<CR>"
+    },
+
+    ["S"] = {
+      "<cmd>PounceRepeat<CR>"
+    },
+  },
+  v = {
+    ["s"] = {
+      "<cmd>Pounce<CR>"
+    },
+
+    ["S"] = {
+      "<cmd>PounceRepeat<CR>"
+    },
   }
 }
diff --git a/plugins/init.lua b/plugins/init.lua
index 2f057c7..3240e83 100644
--- a/plugins/init.lua
+++ b/plugins/init.lua
@@ -27,4 +28,11 @@ return {

   -- navigate on matching text using %
   'andymass/vim-matchup',
+
+  -- fast motion
+  ['rlane/pounce.nvim'] = {
+    config = function()
+      require('pounce').setup({})
+    end,
+  }
 }