Sublime Text 2 - code folding text editor
Started by jaslar
on 1/7/2015
jaslar
1/7/2015 5: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.
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.
Lucas
1/7/2015 7: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):
http://www.sublimetext.com/3
No problems so far.
By the way, I use version 3 (in beta):
http://www.sublimetext.com/3
No problems so far.
tightbeam
1/7/2015 4: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.
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.
yosemite
1/7/2015 4: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.
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.
Paul Korm
1/8/2015 2:40 am
The beauty of Sublime Text (2 and 3) is the enormous number of customization packages available for it. First, install Package Control
https://packagecontrol.io
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.
https://packagecontrol.io
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.
jaslar
1/8/2015 3:46 am
Wow! I just installed the plaintask pacage and I have to say: so Sublime Text is a highly customizable writing environment; it has multi-tabs, endless new plugins and add-in packages; terrific search and multi-file management; code folding; tasks.... How come I'm just finding out about this now?
OK, it doesn't integrate with a calendar (unless there's a plugin for that!) and it doesn't mind map, but.... I may have to live in this a while longer. The tasks package also, I see, reads various task files (including taskpaper), supports tags and date translation, subtasks. Wow.
OK, it doesn't integrate with a calendar (unless there's a plugin for that!) and it doesn't mind map, but.... I may have to live in this a while longer. The tasks package also, I see, reads various task files (including taskpaper), supports tags and date translation, subtasks. Wow.
Paul Korm
1/8/2015 10:57 am
Sublime Text is a plain text environment. On OS X, if you have Marked 2 -- a tool for rendering and exporting markdown documents -- then you can install the Marked Bonus Pack. Among other things, this works with Sublime Text so that when working with a markdown document the Sublime build command (command-B) will open that document in Marked. With Sublime and Marked displayed side-by-side you have a rich edit/render/export environment that beats any markdown editor I've used.
(Except Ulysses III, of course ;-) )
(Except Ulysses III, of course ;-) )
CRC
1/9/2015 4:10 pm
For those looking for a text editor that has markdown support to include folding and previewing, you might want to look at Brackets (http://brackets.io/ The price is right (open source - Free), it has a very large number of plugins (extensions) and seems to have a tremendous number of capabilities and options.
Beware, though, if you go to that site to download Brackets, you may want to avoid the regular download button and click the "Download Brackets without Extract" link below it if you don't want extra stuff.
Once you have Brackets you will have to go to the Extension manager to download the "Code Folding" and "Markdown Preview" extensions. Of course there are plenty of others.
I'd be interested in what others think of Brackets.
Beware, though, if you go to that site to download Brackets, you may want to avoid the regular download button and click the "Download Brackets without Extract" link below it if you don't want extra stuff.
Once you have Brackets you will have to go to the Extension manager to download the "Code Folding" and "Markdown Preview" extensions. Of course there are plenty of others.
I'd be interested in what others think of Brackets.
jaslar
1/9/2015 6:09 pm
There's lots to like here.
- It's free. I like open source.
- Its implementation of extensions is far easier to wrap your head around than Sublime Text's. Brackets feels less complex generally (thanks to your suggestion to download it without Extract options, which I appreciate). I just had to click on extension manager, type the words I wanted, and click to install. The new functions immediately appeared in the program -- no close and restart (which was necessary in Sublime Text).
- It was easier to fiddle with display settings (hide line numbers, expand the font size): menu options rather than preference files.
- It has, like all good code editors, I imagine, lots of great search options, including the ability to search across several active files.
- It was easy to grab the writer enhancements I was looking for: word count (although it becomes a menu option rather than a live update), markdown preview, and spell check (although this one is a little hinky - turning it on led to some unpredictable suggestions as I typed, and turning it off required "clearing markers").
- Its implementation of code folding is much better than Sublime Text's. Brackets' folding automatically follows heading structure: anything subordinate to the current level is automatically tagged with the little tilty-arrow icon, which works just as you'd hope. On the other hand, code folding isn't quite outlining. If you fold text, then try to move it folded, you're only moving that line; you have to be careful about correctly selecting to the beginning of the next section. And there are some little display glitches with code folding in Brackets: sometimes the tilty-arrow gets stuck in one direction (even though it still works) or disappears altogether (although clicking in that area still toggles the display).
- The markdown extension is ... mixed. Markdown generally isn't as accommodating as the Sublime Text implementation: in Brackets, you have to manually insert hypens and numbers in lists, for instance. The extension gives a resizable preview window at the bottom of the screen, which is handy. But you wouldn't want to leave it running all the time while writing - the updates make the whole editing screen flicker. But it's not hard to toggle on and off.
- Brackets has no navigation by structure - jump to a particular heading or show only headings at a certain level.
What I was after was a clean, markdown editor with preview and code folding. Brackets will certainly do all that, and it was much easier to set up than Sublime Text. Both of them are cross-platform (on the desktop, anyhow). And I think Brackets looks a little better, too. On the whole, a pretty interesting offering. Thanks for calling my attention to it.
- It's free. I like open source.
- Its implementation of extensions is far easier to wrap your head around than Sublime Text's. Brackets feels less complex generally (thanks to your suggestion to download it without Extract options, which I appreciate). I just had to click on extension manager, type the words I wanted, and click to install. The new functions immediately appeared in the program -- no close and restart (which was necessary in Sublime Text).
- It was easier to fiddle with display settings (hide line numbers, expand the font size): menu options rather than preference files.
- It has, like all good code editors, I imagine, lots of great search options, including the ability to search across several active files.
- It was easy to grab the writer enhancements I was looking for: word count (although it becomes a menu option rather than a live update), markdown preview, and spell check (although this one is a little hinky - turning it on led to some unpredictable suggestions as I typed, and turning it off required "clearing markers").
- Its implementation of code folding is much better than Sublime Text's. Brackets' folding automatically follows heading structure: anything subordinate to the current level is automatically tagged with the little tilty-arrow icon, which works just as you'd hope. On the other hand, code folding isn't quite outlining. If you fold text, then try to move it folded, you're only moving that line; you have to be careful about correctly selecting to the beginning of the next section. And there are some little display glitches with code folding in Brackets: sometimes the tilty-arrow gets stuck in one direction (even though it still works) or disappears altogether (although clicking in that area still toggles the display).
- The markdown extension is ... mixed. Markdown generally isn't as accommodating as the Sublime Text implementation: in Brackets, you have to manually insert hypens and numbers in lists, for instance. The extension gives a resizable preview window at the bottom of the screen, which is handy. But you wouldn't want to leave it running all the time while writing - the updates make the whole editing screen flicker. But it's not hard to toggle on and off.
- Brackets has no navigation by structure - jump to a particular heading or show only headings at a certain level.
What I was after was a clean, markdown editor with preview and code folding. Brackets will certainly do all that, and it was much easier to set up than Sublime Text. Both of them are cross-platform (on the desktop, anyhow). And I think Brackets looks a little better, too. On the whole, a pretty interesting offering. Thanks for calling my attention to it.
tightbeam
1/9/2015 6:39 pm
Jaslar - another option for you:
https://atom.io/
Both Brackets and Atom are "clones" of Sublime Text. I think there are one or two others, but Brackets and Atom are the major players. For me, they're inferior to the original (and not just in features: Sublime is much faster, especially when dealing with large text files). What keeps Brackets, et. al. on my radar is active development. Sublime Text hasn't had a major update in a long, long time, and its developer hasn't offered much in the way of explanation (or anything else). Sublime support, even for licensees, is very spotty. It's hard to recommend paying $70 *now* for a Sublime license, given these issues.
https://atom.io/
Both Brackets and Atom are "clones" of Sublime Text. I think there are one or two others, but Brackets and Atom are the major players. For me, they're inferior to the original (and not just in features: Sublime is much faster, especially when dealing with large text files). What keeps Brackets, et. al. on my radar is active development. Sublime Text hasn't had a major update in a long, long time, and its developer hasn't offered much in the way of explanation (or anything else). Sublime support, even for licensees, is very spotty. It's hard to recommend paying $70 *now* for a Sublime license, given these issues.
jaslar
1/9/2015 10:27 pm
Mmm, no. Code folding works by level of indent not headings. No spell check. No word count. Installed a theme, then couldn't find a way to select it. Twice, it didn't want to close at all. It's possible I've just hit my stupid hour, but I don't think this one is for me. Thanks, though!
