Confessions of a Sublime Text-aholic

February 22nd, 2013

It’s true. I’m a Sublime Text addict. It’s by far my favorite development tool. End of story!

Just to illustrate, earlier this week, a member of our development team asked how to quickly remove all empty lines from a very large text file. I quickly came up with the following:

  1. Press CTRL-F.
  2. Enable regular expressions (the button entirely in the bottom-left corner).
  3. Search for ^\s*$
  4. Press ALT-ENTER (click on the “Find all” button).
  5. Hit the backspace button.
  6. Done!
  7. Be merry …
    Don’t just take my word for it. Just start using it!

  • ElegantCoder

    +1. This is my default editor outside of VS coding.

  • http://andypalmer.com Andy Palmer

    In Vim:
    :g/^s*$/d

  • http://www.facebook.com/mister.ac Asbjørn Clemmensen

    You obviously need to try Vim, then.

  • Doug Wilson

    I’ve recently switched to ST2 and love it. However, there are a couple deficiencies that prevent me from rolling it out to the entire office. (~20 users)

    1) There’s no (apparent) option to automatically lock files that are open in ST forcing subsequent users to open read-only.

    2) Files that change on disk while open in the editor are automatically loaded. It would be nice if this was configurable, providing ignore and prompt options as well.

    3) When files are automatically reloaded the current cursor position is reset, long files are scrolled back to the top.

    Having said that, Sublime Text seems to be the answer to a lot of other problems I’ve been fighting in TextPad, Notepad++ and Notepad2. I look forward to ST3!

    • JanVanRyswyck

      ST3 is already in the works:
      http://www.sublimetext.com/blog/articles/sublime-text-3-beta

      If you express these concerns on the forum, they might end being picked up.

    • http://andypalmer.com Andy Palmer

      Problems 1 and 2 are problems caused by working from a shared drive. Word, Excel etc provide file locking as a fudge, but a decent Version Control System would solve these problems elegantly (and allow better collaboration)
      Problem 3 would also vanish because files wouldn’t be changed from underneath you.

  • Jasmine

    Ever heard of WebStorm or any of the other IDE´s provided by jetbrains? (no file editor can ever beat a truly intelligent IDE)

    • JanVanRyswyck

      I use WebStorm for debugging Node.js apps. After that I head back to SublimeText as quickly as possible.

      • Jasmine

        But how do you handle refactoring in large javascript projects? Doing it manually does not feel so nice… Choosing not to refactor something that’s obviously in need of refactoring because you’re scared that your code might crash does also not feel so nice.

        • JanVanRyswyck

          I do refactor … a lot actually. The multi-cursor feature helps me quite a lot. I do not have the feeling that I’m missing out, especially when it comes to JavaScript code.