Domain: nickgravgaard.com
Stories and comments across the archive that link to nickgravgaard.com.
Comments · 39
-
Re:Any typography warriors out there?
You DO realize this isn't a binary choice, right?
* Indent with tabs; align with spaces * Elastic Tabstops * Smart Tabs
= Smart Tabs =
Emacs: * https://github.com/jcsalomon/s...
Vim: * https://www.vim.org/scripts/sc... * http://vim.wikia.com/wiki/Inde...
So, you're telling me that, insead of simply using spaces and getting it all correct, I should use tabs, and where tabs break down *then* use spaces?
-
Re:Any typography warriors out there?
You DO realize this isn't a binary choice, right?
* Indent with tabs; align with spaces
* Elastic Tabstops
* Smart Tabs= Smart Tabs =
Emacs:
* https://github.com/jcsalomon/s...Vim:
* https://www.vim.org/scripts/sc...
* http://vim.wikia.com/wiki/Inde... -
Re:Finally a chance to do things right
If we're going to do this right, we should use elastic tabs.
Base 12 has some definite advantages over base 10. I would prefer new glyphs for A and B, but I'm not finding anything attractive. (/. would promptly eat them anyway.) Any ideas?
Naturally, our Dvorak keyboards could be a little wider for the additional 2 digits which could give room for some compose-like keys, maybe grave, acute, circumflex, dieresis--at the risk of proposing a new space cadet layout.
No opinion on tau vs. pi.
-
Spaces are better, Tabs COULD be better (elastic)
From the link:
The solution - move tabstops to fit the text between them and align them with matching tabstops on adjacent lines
http://nickgravgaard.com/elast... -
Re:Spaces are for people who don't understand tabs
The conventional wisdom is "Tabs for indentation, spaces for alignment."
The problem is the people _mis-using_ tabs -- which SUCKs. When people use tabs for everything it completely screws you over with formatting unless you use _also_ use the exact same tab settings.
The tab solution would be great IF (text) editors implement elastic tabs:
http://nickgravgaard.com/elast...Until then, spaces solved the problem of perfect alignment and indentation 100% of the time. Tabs don't. Hence "spaces are the lowest common denominator".
I don't like most people's code formatting anyways spaces vs tabs doesn't solve the problem. Usually they have crappy variable names, piss-poor design with bad locality, don't understand multi-column alignment, over-engineer the simplest algorithms. Whitespace is only a small problem compared to the bigger problems.
-
Or, you know...
There are other DEs/WMs out there. XFCE, LXDE if you want a somewhat complete DE, WindowLab if you want something minimal but like your mouse, i3 if you like tiling (or xmonad if you swing that way).
KDE's sure to use more memory than some of the other competition, and if you're like me and only have 2GB of RAM in your primary machine, that's important.
-
Re:False assumption
Exactly. People who stick to spaces for indentation don't realise that there is a difference between indentation and alignment.
But elastic tab stops are still the best: http://nickgravgaard.com/elastictabstops/
-
Re:TAB is the one true indentation
Elastic tabstops are awesome. Have you seen this? Announcing the Visual Studio 2010 plugin limited public beta
-
Re:How is newline invisible
Generally I use tabs for logical indentation, then spaces for visual alignment. That way the code will align properly no matter what tab spacing is used by the person reading the code.
I wish I could mod your post up. I use your way, and it works well, at least until we get elastic tabstops.
-
Re:Why put tabs in code anyway?
What you and parent want is elastic tabstops. That solves the problem of people that don't understand that tabs are for indentation and spaces for alignment. See http://nickgravgaard.com/elastictabstops/
People are different and different people need different tab sizes to make the code optimally readable for them.
Also, I've never had to search for a tab character, why are you searching for whitespace?
If math or if constructs are so complex they become unreadable, they probably should be split up in multiple statements. That's much better for understanding what happens that trying to mess with the layout of that single statement.
-
Re:Tabs vs. Spaces
IANAP (yet), but Elastic tabstops look nifty. would totally suck unless every editor supported them though.
-
Re:Overrated
Elastic tabstops solve the alignment problem. "Do what I mean, not what I say" with whitespace is a good thing, particularly when the width of a character can be totally different for every reader. Elastic tabstops aren't implemented in many editors yet (currently available as an optional feature in gedit and Code Browser), but once it becomes more widespread, many more programmers will be free to try out proportional fonts for coding.
-
Re:Overrated
Elastic tabstops solve the alignment problem. "Do what I mean, not what I say" with whitespace is a good thing, particularly when the width of a character can be totally different for every reader. Elastic tabstops aren't implemented in many editors yet (currently available as an optional feature in gedit and Code Browser), but once it becomes more widespread, many more programmers will be free to try out proportional fonts for coding.
-
Re:Vertical alignment
You're probably advocating for editors to support elastic tabstops which seem to work well also on proportial fonts. But I don't think ascii art can survive without fixed fonts.
-
Re:Vertical alignment
You're probably advocating for editors to support elastic tabstops which seem to work well also on proportial fonts. But I don't think ascii art can survive without fixed fonts.
-
Re:Sometimes the correct answer is the simplest
Tabs mean I can view code with four space indenting, you can view the same code with two space and someone else can view it with eight space. Besides, a tab's whole purpose is indenting. And if you didn't use spaces, you wouldn't have problems.
Everyone uses spaces. But let's say you don't. Everyone else uses spaces, so other people's code still looks messed up. Tabs suck, that's all there is to it. Elastic tab-stops look like a solution, but not likely to see wide adoption.
-
Re:Menus at the top!
X Window System users interested in Fitts' Law would do well to look at windowlab. It uses some interesting tricks to make application launching and task switching with the mouse faster than anything else I've come across.
-
Re:First Column!
With proportional fonts, that breaks and will always break.
Recently there's been some work done to solve this. It's still early days but it looks promising to me - see elastic tabstops:The solution then is to redefine how tabs are interpreted by the text editor. Rather than saying that a tab character will move the cursor until the cursor's position is a multiple of N characters, we should say that a tab character is a delimiter between table cells in a manner more reminiscent of how they're used in tab separated value (TSV) files. Seen in this light, we can see that space aligned files are analogous to the old fixed width data files, and we all know the advantages that delimited files have over those. For one thing, you can use sed or other tools to substitute strings in files and everything will still line up when you load them in the editor. Another advantage is that proportional fonts can now be used.
-
Re:First Column!
Something like this?
http://nickgravgaard.com/elastictabstops/ -
Re:Life is too short!
Ugh - WindowLab is smaller, faster and smarter.
-
new version out soon!
-
new version out soon!
-
Re:kudos on UI so far / how about cursor-trapping?
"WindowLab does not appear to trap the cursor at all"
WindowLab does trap the cursor (from WindowLab's site): "the pointer is also constrained to the taskbar/menubar in order to make target menu items easier to hit".
Why not try it out and see for yourself?
"nor does it give easy access to ... drop-down menus (File, Edit, etc)."
No window manager can do this. The problem with applications' drop down menus is that they are handled by the client and not by the window manager, so the only way to change them is to edit the app (or the toolkit it uses) itself. It would be nice if client menus could be implemented in a policy free way so that the window manager (or a "menu manager") could decide to display them in a Mac style top-of-the-screen-menu, X/Windows style menu-in-window, Next style dockable menus or whatever... -
Re:kudos on UI so far / how about cursor-trapping?
Sounds like windowlab to me...
Thanks for mentioning WindowLab, I had never heard of it. WindowLab may have been once ahead of its time, but that is no longer the case; for example, Openbox allows disabling raise-on-click and has a resize hotkey for altering it in two directions at once. The "menubar" mentioned on the project's site refers to the launcher, which most desktop environments have easy access to already.
Additionally, this does not implement my request. WindowLab does not appear to trap the cursor at all, nor does it give easy access to window decorations or drop-down menus (File, Edit, etc).
-
Re:More good than harm.
Sounds like you could use WindowLab. It has a taskbar and menubar at the top of the screen and generally feels very Amiga-ish.
-
Re:I think it's true...
You're absolutely spot on here. Look at the aewm project (a good reference implementation of an ICCCM compliant window manager), and then look at how many derivatives it has:
aewm++, alloywm, evilwm, maewm, Oroborus, phluid, Sapphire, swm, Clementine, WindowLab, YeahWM, Spook, wimpwm
Some of these are genuinely innovative but how many of them would exist if their authors had had to reimplement everything from scratch? -
Re:I've tried this
"In short, try something else, preferably something which doesn't include the ability to rotate windos around their own axels."
I found a window manager called WindowLab over the Xmas hols. It's nice to see that some people are trying to innovate without taking the flashy but ultimately impractical route. I don't know whether it could ever be ported to Windows though... -
Re:Never saw a point for it
"I like exposé, though. That is really innovation at it's best. They dropped the tired windowlist/taskbar/tabbed-browsing paradigm and invented something just as effective (dock + exposé). I definitely like the innovation in OS X, which is why I use it. I'm tired of the blatant Windows copying of GNOME and KDE."
Have you seen this? I haven't used Exposé, but apparently some people reckon this is better. -
Re:Glad to see it's still around
Innovative? I mean sure it looks nice, but it's not really that different to everything else out there. Try something like WindowLab to see one attempt to innovate in this area.
-
Re:Neat Gimmic, but...
"If I recall, there was an alternate windows manager called the Cube, that worked similar to this... what ever happenned to it?"
There's the 3D-CUBE project which includes 3Dwm (site appears to be down at the mo).
Personally, I agree with you - a 3d window manager won't work very well on a 2d screen. The is some real innovation in 2d window managers however, look at WindowLab and Ion. -
Re:What is this?
Enlightenment and WindowLab are two projects that spring to mind. There are many more.
-
Re:that's Longhorn?
Talking of Expose, apparently WindowLab (a window manager) is supposed to do task switching better ("When you have many windows open and lose track of which window you want next you can click on a taskbar item, and if it's not the right one, slide the pointer over the other items in the taskbar (with the mouse button still depressed) to see the other windows. As with the menubar, the pointer's constrained to the taskbar so that you can make faster and less careful mouse movements. With many windows open this is faster than CoolSwitch (alt-tabbing) in Windows (although WindowLab does have a similar keyboard shortcut in alt-tab/alt-q) and some Mac OS X users have told me that it beats Expose too").
This sounds pretty dubious to me - do any Mac users know if this is true? -
Re:Yes well done /.
I figure there's more open source window managers for X Windows then there are proprietary GUIs, and it's a shame that GUIdebook doesn't cover them. There's a good site here that does.
Unlike proprietary GUIs, some of the open source offerings are more innovative. I particularly like Ion, a tiled wm, and WindowLab, which seems pretty original. -
WindowLab
-
WindowLab
-
I wonder...
...what Tog would make of this. It takes advantage of Fitts's Law in a way I haven't seen before, and the author claims that some Mac users think one of its task switching methods is faster than Mac OS Xs Expose. While the window resizing is a little odd (apparently the author's aware of this and is working on it), hopefully he'd approve.
-
Re:d1ff1cul7 70 u53 0r?
Interesting point, although personally I have a passionate dislike of MDI. Here is a window manager that preserves windows Z orders and has a task swiching mode that, for some, apparently beats Expose. Using this may meet your objectives without using MDI.
-
Matchbox and WindowLab
Matchbox is the obvious one to go for because it's been designed especially for "computers with little screen real estate, limited input mechanisms and low cpu/storage resources".
Alternatively, there's WindowLab which might work well since it reuses the top of the screen for both a taskbar and app launcher. This one's probably a bit of an aquired taste. -
Re:Related question