FelixKratz / SketchyVim

Adds all vim moves and modes to macOS text fields
GNU General Public License v3.0
692 stars 9 forks source link

abbreviations expands on insert mode exit #17

Closed NationAdel closed 2 years ago

NationAdel commented 2 years ago

Hi, Thanks for the great project. I am not online very often and so I don't read much of other peoples comments and issues unfortunatly. mainly I read the manuals. so I decided to use the abbreviations in svim since snippets are a little more involved.

iabbrev @@ some@some.com

and it only expands when i exit insert mode . normal it expands after I press the space bar. it is a built in feature of Vim/Neovim it would be a great to have it working. thanks

FelixKratz commented 2 years ago

This is a safety feature included by design: https://github.com/FelixKratz/SketchyVim/blob/acda553401800f2cb8a929486f050a1891e07a6b/src/ax.c#L231

If you don‘t leave insert mode svim will never touch the contents of the text field. This is because some text fields are broken with the AX api and it would be catastrophic if I simply overwrote all contents of the field.

NationAdel commented 2 years ago

its good to know. It is great still for the usage this is intended for. I thought it would be great to do more.