Home Download Buy Blog Forum Support

ST2/3 Edit Abstraction

Re: ST2/3 Edit Abstraction

Postby FichteFoll on Sun Jan 12, 2014 7:01 pm

https://github.com/FichteFoll/AAAPackag ... ib/edit.py

I changed it a bit:
- Added some documentation.
- Removed sel method, because I have no idea what it is supposed to do.
- Removed FutureEdit stuff that you added recently and instead check if a parameter is "callable". Reduced the required amount of code.
- Added classmethod `Edit.call(func)` which is basically `with Edit(edit) as edit: edit.callback(func)`. With this you just need to write a function like TextCommand.run and pass it.
Posts: 953
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: ST2/3 Edit Abstraction

Postby lunixbochs on Wed Jan 22, 2014 3:22 am

FYI, my latest incarnation of it is in ActualVim: https://github.com/lunixbochs/actualvim ... er/edit.py

I have `defer` vs `call`. I use Edit for selection, because sometimes you need a command to kick through a proper buffer refresh.
Posts: 92
Joined: Fri Oct 08, 2010 10:18 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 5 guests