owickstrom / idris-vimscript

Compile Idris to Vimscript, like you always wanted.
Other
130 stars 5 forks source link

Pass closures to Vimscript functions #4

Closed owickstrom closed 6 years ago

owickstrom commented 6 years ago

Would be nice to have things like nmap and friends take closures of some sort in their Idris versions.

nmap <whatever you have here> (\arg => <handler code here>)

We could also restrict it to top-level functions, and have something like:

yourHandlerFunction : Arg -> IO ()

main =
  nmap <whatever you have here> yourHandlerFunction

As passing functions is not a common pattern in regular vimscript, maybe this shouldn't be a priority for integrating with other vimscript stuff.

owickstrom commented 6 years ago

Closing this until we see the need.