8 ms·
I upvoted you for this - I think it's a really interesting idea. Why can't my editor tokenize my code and then show it in the format I want? Why do I, as the p
by memset 13y ago
I upvoted you for this - I think it's a really interesting idea.
Why can't my editor tokenize my code and then show it in the format I want? Why do I, as the programmer, have to worry about whether one whitespace convention works for you versus me, when you could just come up with whatever scheme you like and view code that way?
- coldtea 13y ago>Why can't my editor tokenize my code and then show it in the format I want? Because editors are written by humans. And as of now, we haven't sold a whole lot of problems with their use. For example, you get an IDE with lots of features, but a subpar editor, crammy UI and GC pauses (3 of the five most popular are written in Java). Or you get something like VIM, with a great editor, but subpar compatibility with the rest of your system, not very good understanding of the code (refactoring, tokenizing etc). '80s GUI capabilities etc, ad-hoc collection of plugins to fix basic pain points (like file navigation). Or you get Emacs, with millions of configurable options, a subpar extension language, script in various stages of great and rot, '80s GUI capabilities, etc. In general, we lack tools that run the whole gamut: great editor, fluent shortcuts (either Emacs or Vim style), 2013 GUI capabilities, refactoring and intimate knowledge of program syntax (to the level of understanding the AST, no BS regex used for syntax highlighting), embedded REPLs and terminals, etc. Something like a Lisp Machine + Smalltalk UI + Light Table + Visual Studio + Vim/Emacs combo.
- ardacinar 13y ago"something like VIM, with a great editor, but subpar compatibility with the rest of your system" Excuse me, but vim has much better compatibility/interoperability with the rest of my system than all the IDEs written in Java.
- blt 13y agoVisual Studio with a VIM emulator plugin is pretty nice...
- qu4z-2 13y agoBetween ^Z, :<range>!, :grep, make, and other tools, vim has great compatibility with my system, thanks :)
- coldtea 13y agoDo it have an in-editor terminal? An in-editor debugger? Does it offer a REPL? Does it work with your build system and your SCM system without some ho-hum third party plugins?
- qu4z-2 13y agoIn-editor terminal? ^Z or :shell (Asking for an in-editor terminal makes about as much sense as my whinging that Eclipse doesn't have an in-terminal editor) In-editor debugger? I admit this is less than ideal. A REPL? Languages suited to REPLs have REPLs, and a lot of them support SLIME, allowing me to interact with the REPL from vim. For everything else there's tmux. Build system? :make and errorformat SCM integration? ^Z. Or fugitive I guess. (a third party plugin, yes. But if you think it's ho-hum, you probably haven't used it).
- sesqu 13y agoWell, there's stuff like word wrap and GNU indent and a host of pretty-printers, but I think you're looking for something more resource-intensive and integrated. The question then becomes, why configure a transformer when you can just format it right the first time?
- egypturnash 13y agoBecause, aside from Python and its One True Way to format, different people have different ideas of what "formatting it right" means.
- westurner 13y agoFunny, someone was just talking about 79 characters per line in regards to using soft tabs for editor display consistency, the other day. http://www.reddit.com/r/java/comments/1j7iv4/would_it_not_be_better_if_indent_was_managed_by/cbcryyr http://www.reddit.com/r/java/comments/1j7iv4/would_it_not_be... These are useful for static code analysis and finding congruence with typesetting conventions: https://pypi.python.org/pypi/flake8 https://pypi.python.org/pypi/flake8 https://pypi.python.org/pypi/condent https://pypi.python.org/pypi/condent https://pypi.python.org/pypi/pep8ify https://pypi.python.org/pypi/pep8ify