Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic tabstop editors and plugins

Tags:

editor

tabs

What Windows code editors allow the use of elastic tabstops, either natively or through a plugin?

I know about a gedit plugin, but it only works on Linux.

like image 886
AnnanFay Avatar asked Aug 26 '08 17:08

AnnanFay


4 Answers

Code Browser may be the first for windows. I would love to see this feature as a plugin for other editors as well.

like image 60
moshen Avatar answered Oct 09 '22 05:10

moshen


I did quite a bit of googling trying to find this answer. There are plenty of people asking for it:

  • http://developers.slashdot.org/comments.pl?sid=414610&cid=21996944
  • http://www.arguingwithmyself.com/archives/75-the-biggest-feature-your-editor-is-missing
  • http://intype.info/blog/screencast-parser-in-editor/#comment-221
  • http://codewords.wordpress.com/2006/10/16/eclipses-achilles-heel/

just to name a few...

so I don't think one exists yet, sorry :(

like image 40
Jiaaro Avatar answered Oct 09 '22 06:10

Jiaaro


Code Browser supports elastic tabstops, but it appears to be the only thing for Windows that currently supports it. Unfortunately, it has an unusual UI which may render it unsuitable for multi-person projects, and may even make it difficult for you to use even if no other editors are involved.

According to the elastic tabtops website, he's working on plugins for eclipse and Visual Studio 2010 (though the Eclipse plugin is stalled pending a bugfix, and jedit should support elastic tabstops in an upcoming version.

Finally, though this probably isn't an option, you could try running an x server (such as Cygwin/X or Xming on your Windows computer and ssh into a Linux client (either a virtual machine or another computer) to run Gedit. This approach has many problems though: you need to keep your files on a separate computer (perhaps using Dropbox to keep them in sync), X over SSH is notoriously slow, and you need either another computer or a virtual machine.

like image 3
Daniel H Avatar answered Oct 09 '22 05:10

Daniel H


XMLQuire is an XML editor developed for windows to showcase virtual formatting. This concept goes a step further than elastic tabstops, indentation is simply a function of the position of the preceding line-feed character and the nesting level and context assessed by the parser:

Code formatted using virtual formatting

It's the XML parser that determines the nesting level and therefore the required indentation, there's no reformat key or tab key to press, the XML formatting just reflows as you edit, drag and drop etc.

This means that XML is always properly indented, but without leading tabs or spaces. The concept should also work for more conventional code (except for languages like F# that exploit whitespace), but this has not yet been tried out.

Note that, unlike elastic tabstops, virtual formatting only works from the left-margin and only uses the parser context. The parser context is more than just about nesting level though, factors such as mixed content, node-type, length of parent element name and attribute name all come into the equation. This allows alignment of attributes and attribute values that occur on new lines also (as shown).

Word-wrapped text naturally just fits to the indentation scheme. If further text formatting is required then space characters are added by the user in the conventional way.

As with elastic tabstops there's a potential issue when virtually formatted text is opened in a more conventional editor. However, because no characters have been added for XML formatting (it was all virtual), conventional editors can simply apply conventional formatting according to the settings for that editor, uses tabs or spaces.

like image 3
pgfearo Avatar answered Oct 09 '22 05:10

pgfearo