max397574 / better-escape.nvim

Map keys without delay when typing
GNU General Public License v3.0
629 stars 19 forks source link

Better move cursor #57

Closed kobzar closed 8 months ago

kobzar commented 8 months ago

Hi. Could you little update your plugin to make it better? If we are working with arrow keys to make better of change modes, is it possible to add "hh" and "ll" keys for move cursor to begin/end of line like $ and 0 Its really will be awesome for any who use vim. And add it in setting like

-- lua, default settings
require("better_escape").setup {
    mapping = {"jk", "jj"}, -- a table with mappings to use
    -- Uncomment next line to enable move cursor to begin/end of line
    --move_mapping = true,
   -- Insert/visual mode after move cursor
   -- move_mode = "visual|insert"

}

Thanks.

max397574 commented 8 months ago

I won't add this because those mappings are really opinionated and imo problematic because ll is something quite common (e.g. hallo) this would be possible with the upcoming rewrite which you can already find here with the feat/rewrite_with_mappings branch there you could do

mappings = {
  i = {
    h = { h = "<esc>0i" }
  }
}