max397574/better-escape.nvim

Save after escape

Closed this issue · 1 comments

Hello @max397574 ,

This is not a request, but just an idea that I would find pretty useful:

If this plugin had an after hook config:

mappings: ...,
timeout: ...,
clear_empty_lines: ...,
key: ....,
after_escape: function(mapping, file)
 if mapping == "jk"
...
end,

it would allow for saving after escape. I bet there are other scenarios where this would be useful as well.

Thoughts?

  1. this will easily be possible with the rewrite I got locally hopefully comming soon
  2. this should already be possible by setting keys to e.g. <esc>:w<cr> haven't tested that yet though