Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    N

    Nick Gravgaard

    nick-gravgaard.com · Personal blog · on HN since 2023

    Nick Gravgaard is a software developer who invented elastic tabstops, a way to align tabular text in code, and a keyboard layout idea.

    Visit blogHN submissions
    ProgrammingDesign & UX
    What HN says

    HN commenters bring up elastic tabstops whenever code alignment comes up, noting that editors still largely lack support for them.

    Stats for nerds
    17HN people shared it
    4linked in comments
    111story points
    May 2026last shared
    2023people per year2026

    Top posts on HN

    1. 1
      QWERTY-Flip: The better keyboard layout your fingers already know
      1 person · 107 points · first shared 2024 · 115 comments on HN
    2. 2
      Elastic Tabstops
      16 people · 4 points · first shared 2023 · 1 comments on HN

    What HN people wrote when they linked it

    • autumn-antlersApr 2024

      This was once my understanding, and the accessibility argument still speaks to me, but I wish Elastic Tab-stops saw more discussion and support.

      https://nick-gravgaard.com/elastic-tabstops/

      I'll try to do my part.

      I've been writing (and reading) a lot of Lisp lately, and have seen some projects adopt indentation idioms which offset blocks from the regular tab-stop intervals. A standard tab-stop might be +4, but then arguments might be lined up with each-other at +6 (+1.5 stops):

      (list 'a 'b 'c) Any of those arguments could be forms, which might return to the standard tap-stop of +4 but off by 2 (let's call that `+4(+2)`):

      (list 'a (with-foo quz (bar quz)) 'c) Lists written with the `quote` syntax might do the same thing, but produce an offset of only 1:

      '(a (b (c))) The end result is that changing a code's indentation level (like when raising an anonymous function into a top-level definition) means adjusting the spaces (which were supposed to only be for alignment) if any preceding forms had introduced an offset. The alignment doesn't change, but it's relation to regular tab-stops does. Sometimes, this is an adjustment of zero, but you still need to think about it. In an all-spaces environment you could use vim's visual mode to select the block as a rectangle and paste it into the top level, but with "indent/align" semantics this same situation regularly requires maintenance (by inserting…

    • Chris_NewtonSep 2024

      I do wish we were more adventurous in how we present our code in editors. As the article says, we seem to be stuck in a rut. Typography in the main editing area is almost always based on a classic monospaced text file. Colours are almost always based on “syntax highlighting”, which in turn often involves distinguishing elements of the language we’re looking at whose differences aren’t very important.

      Given the potential of modern graphical environments and typography, I’d like to see languages and editors adopt simple spacing improvements like elastic tab stops¹. I don’t want to chose between an aesthetically pleasing layout that draws attention to patterns and anomalies in my code and a layout with completely uniform spacing because anything more carefully aligned is a pain to maintain in later edits and adds noise to diffs. We could shrink blank lines to half-height as well, which would keep the useful visual separation but waste less space.

      I’d like to use a (somewhat) wider range of basic symbols than whatever we had in ASCII last century. Even allowing comparison operators like ≤, <, ≠ and = that align consistently would be a useful start.

      I’d like simpler syntax highlighting, concentrating on distinguishing major language elements like literals, variables and types, and emphasising problems I probably care about like unclosed strings and misspelt keywords. I’d also like to see colour used more effectively for matching related code like opening/closing pairs or the…

    • IzkataMar 2025

      AST level would have to automatically figure out what parts should be aligned, an alternative is to keep saving it in text but tweak the meaning of the "tab" character, so the developer still has control over what gets aligned: https://nick-gravgaard.com/elastic-tabstops/

      Not great since viewing it in something that doesn't understand elastic tabstops would just be a mess, but it solves one of the issues the other response brings up, and I think some sort of user control like that is going to remain necessary either way.

    • jiehongOct 2024

      Those points really depend on context:

      - if it’s code, you should be using an automatic code formatter and that’s it. - if you write prose, sure, soft wrap.

      If you grep, \s doesn’t care about space vs tabs.

      Sadly, elastic tabs never caught as the default [0].

      Maybe we would need something like a "semantic alignment" marker instead of using spaces for aligning things. Like beginning of function name, beginning of function argument, etc.

      [0]: https://nick-gravgaard.com/elastic-tabstops/

    • infogulchApr 2024

      I don't know of any text editors that don't render variable width tabs based on the tabstop position. In programming environments we usually only use tabs at the beginning of the line for indentation, it's a bit more rare to use them for alignment due to inconsistent tabstop settings.

      There's also Elastic Tabstops if you want to go all in on using tabs for alignment: https://nick-gravgaard.com/elastic-tabstops/

    • fainpulJul 2025

      I fully agree that proportional fonts are nicer to read, even for code. When I tried to use it, I got annoyed by Go, which autoformats code with spaces to align stuff and that looks very ugly with a proportional font. The solution would be elastic tabstops [1], but that seems just to be a concept without actual support in any editor.

      [1] https://nick-gravgaard.com/elastic-tabstops/

    Related

    Evan Martinneugierig.org125 people

    TypeScript at Google

    Evan Martin
    Personal · last shared 2026
    Nick Johnsonblog.notdot.net88 people

    Damn Cool Algorithms: Levenshtein Automata

    Nick Johnson
    Personal · last shared 2025
    Tablizergeocities.com57 people

    "Computer Science" is Not Science and "Software Engineering" is Not Engineering

    Tablizer
    Personal · last shared 2026
    Isaac Schlueterblog.izs.me88 people

    A member of our community is missing, help find him

    Isaac Schlueter
    Personal · last shared 2026
    Simon Tathamchiark.greenend.org.uk/~sgtatham363 people

    Simon Tatham's Portable Puzzle Collection

    Simon Tatham
    Personal · last shared 2026
    Russ Coxswtch.com/~rsc284 people

    How Google Code Search Worked: Regex Matching with a Trigram Index (2012)

    Russ Cox
    Personal · last shared 2026
    Peter-Paul Kochquirksmode.org266 people

    Web vs. native: let’s concede defeat

    Peter-Paul Koch
    Personal · last shared 2026
    Nick Moorepilotmoon.com31 people

    Scroll Reverser for Mac OS X

    Nick Moore
    Personal · last shared 2026