Ask HN: Are there any IDEs or editors that support editable views of code/text?
What I am imagining is this: The underlying file format does not change. You can specify some sort of bidirectional transformation, via regexes or maps or something. The editor presents you with an editable view of the text, with this transformation applied. When you make edits, the reverse transformation is applied to the underlying file.
Think of it as a vastly expanded version of git's 'change line feed' options. Your team likes tabs but you like spaces? Edit in spaces view - they never get into the file. Your team likes veryLongDescriptiveCamelCaseNames, but you like to kp it trs? Edit in terse view - the file is always camelCased.
I'm not really looking for a solution to one or both of these problems in particular, though. I'm really looking for an editor that even has a notion of "editable -views- of text" to begin with. Does this exist?
4 comments
[ 2.8 ms ] story [ 17.0 ms ] threadEdit: Oops. Now I'm thinking this would probably break all code analysis features. It would be nice if there was a notion of a 'view' that is very superficial and doesn't impact the code analysis.
In Sublime Text for example, the above would be writing a Python class that handles some of these events:
https://www.sublimetext.com/docs/3/api_reference.html#sublim...
...probably by making use of the subprocess module from Python's standard library:
https://docs.python.org/3.3/library/subprocess.html