Inline transformations (2)
I built a pretty printer for mobl, and now I’d some way to actually apply it to the current file. Currently I have to select everything, choose “Transform” and then pick the Pretty printer there that opens it in a new file in a separate tab. I want the result to be applied in the file I’m editing, not into a separate file. Preferably I could assign a shortcut to this, like Ctrl+Shift+F or something.
Submitted by Zef Hemel on 13 April 2010 at 11:07
Issue Log
We want something like this for refactoring as well. Maartje any comments?
There is now (to be tested) a primitive function for applying text changes
apply-text-change= prim(“SSL_EXT_text_change”,, )
possible arguments:
- ((l,c,l-end,c-end),“text-fragment”)
- ((offset, end-offset),“text-fragment”)
- (term,“text-fragment”)
refactoring : “Format Code” = format-code [in myLang-Builders.esv]
format-code: (selected, position, ast, path, project-path) -> [(selected, selected)]
format-code: (selected, position, ast, path, project-path) -> [(selected, pp-result)]
where pp-result:= …
Log in to post comments