Sublime Text 2 - code folding text editor
< Next Topic | Back to topic list | Previous Topic >
Posted by jaslar
Jan 7, 2015 at 05:59 AM
Haven’t seen this one before here.
I got curious about markdown editors that allowed for code folding. Eventually, Google offered me something called Sublime Text 2, which is a multi-platform (Mac, Windows, Linux) “sophisticated text editor for code, markup and prose.” http://www.sublimetext.com/. It was a free download, so I grabbed it.
I spent a lovely couple of hours removing line numbers, increasing the font size, switching the theme to black text on white background, adding a word count plugin, and loading an HTML preview to the markdown syntax. It even has a distraction-free, full screen mode. It has lots of keystroke shortcuts to get things done, handy for touch typists. At this point, it looked a lot like WriteMonkey.
I checked out all the text editing commands. I made sure it had spell check. It has tabs for managing multiple files, and ways to display a file in multiple columns. It does macros. It does project management (IDE type things). It has powerful search commands.
Code folding is odd. Text either has to be indented (as in code) or selected (highlight anything you want, then issue the command to collapse it to a horizontal yellow bar, then there is an arrow to expand it again - just hover your mouse along the left margin). And you do have to be careful. Delete that little yellow bar, and all the text hidden beneath it is gone, too. But there’s an whoops command (Command-Z on the Mac, which is what I’m playing with today), thank goodness.
So it doesn’t work quite like the obvious onscreen visual cues of a typical outliner. But ultimately, it offers even greater control over what appears.
My conclusion: this is a powerful piece of software, bristling with menu options. And it didn’t take long to customize the heck out of it.
Finally, I tried to find out what the “unregistered” flag at the top right was about. Answer: Sublime Text is neither open source nor free. A license costs $70. But that’s per person - you can put it on as many machines and operating systems as you like. I probably won’t pay that, although I’m sure it’s worth it. It kinds of looks like you could keep using it without paying, but I don’t hold with that. Nice to get a chance to put a program through its paces first, though.
So I had a most pleasant evening CRIMPing, and wound up with a pretty robust, multi-platform, outliner-friendly writing environment by the end. Others of you might find it interesting, or useful, or both.
Posted by Lucas
Jan 7, 2015 at 07:28 AM
Yes, my limited experience with Sublime Text has also been positive. It’s an excellent text editor overall, although it’s not my favourite implentation of folding (I prefer, for example, the way some other editors indicate, in the folded state, the number of folded lines).
By the way, I use version 3 (in beta):
No problems so far.
Posted by tightbeam
Jan 7, 2015 at 04:09 PM
I’ve been using SublimeText (first v2, now v3) for a couple of years. It’s an all-purpose workhorse: code (HTML, CSS in my case), blog posts, short articles (in Markdown). I’m in it every day, and I’ve never had a problem. It takes some time and experimentation to optimize the default preferences, find/install the right packages (add-on functionality, such as word count), discover indispensable features like projects and groups, and create some useful key bindings (for example, one that lets me select text and then press an assigned key to wrap that text with html tags), but once you’ve got it the way you want it, SublimeText is a joy to work with.
However, I’ve never used it as an outliner. It’s certainly possible, and the GoTo commands make it a breeze to navigate even a huge outline with a few keystrokes, but compared to apps like Workflowy, SublimeText is a bit clunky in that regard.
Posted by yosemite
Jan 7, 2015 at 04:31 PM
I’ve tried Sublime for outlining, I think it could work well but it does need some customization and plugins. I especially like the speed of it, the document map, the customization options, the keyboard shortcuts. It does regular expressions of course, and can search multiple files, and can indeed have super duper powerful search options.
I don’t think it’s available on ios or android.
I used this plugin to try to add folding function, but I’m not real happy with how it shows it:
https://github.com/davidpeckham/sublime-filterlines
This pluging does “filtering” and “folding”, where “filter” means find matching lines and make a new file or window/tab containing only those lines. And “fold” is hiding lines by replacing them with the yellow dot dot dot thing.
I’d be very interested if someone has made Sublime part of an outliner-type workflow.
Posted by Paul Korm
Jan 8, 2015 at 02:40 AM
The beauty of Sublime Text (2 and 3) is the enormous number of customization packages available for it. First, install Package Control
They use Preferences > Package Control to install any of the packages described at the Package Control site. For exaple, a folding text package I use is PlainTasks, written by user aziz
https://packagecontrol.io/packages/PlainTasks
Folding text is just the tip of the iceberg.