Sublime Forum

Follow-mode for Sublime?

#1

I’m using a 27" iMac and would love a feature akin to follow-mode on emacs. I have tons of screen real estate but can’t effectively use it from most text editors. Sublime has something similar, with File -> New View Into File, but that lacks the auto-wrapping that I’m really looking for.

Why not just use emacs? Because it fits into OS X poorly and has an insane learning curve that’s not worth surmounting for the very simple stuff I do: blogging, simple scripting, etc.

(I wrote some about my experience here, at the OS X forum on Ars Technica, where I also first learned about Sublime.)

0 Likes

#2

I’d like to add multiple column editing in Sublime Text 3, however it won’t make it into Sublime Text 2. You could likely make an approximation with a plugin though.

0 Likes

#3

I’m trying to add this to bufferscroll. It would be nice if the bug in set_viewport_position get a fix. =)

0 Likes

#4

I was able to add this to BufferScroll package. This is pretty cool, unfortunately I use a notebook and my width is a little reduced.

Very new feature, very little amount of tests, feedback is appreciated.

1 - Install BufferScroll via Package Control wbond.net/sublime_packages/packa … stallation
2 - Go to Main menu bar -> Preferences -> Package Settings -> BufferScroll -> Settings User

There you need to enable this feature which is disabled by default.
If the file is empty add this:

{ 
	"synch_scroll" : true
}

If not add this:

	,"synch_scroll" : true

In theory now you will see that cloned views will synch. However, very new, it need more tweaks.

3 - If you use this frequently, send some $ to this paypal account extensiondevelopment@gmail.com
4 - remember 3!

Mayor Know bugs:

  • non optimal detection of viewport_position/viewport_extent change

[stroke]Minor bug:[/stroke]

  • This is was fixed : A folded region will likely to change the numbers of lines displayed
  • This is a feature :Synch will happen when scrolling the view that contains focus. (currently clicking the minimap does not focus the view, this allow to scroll views without focus without making your current view scroll [cool])

Sublime limitations:

  • there is no sublime APIs: “on_viewport_position_change”, “on_viewport_extent_change”.
  • set_viewport_position has a bug.

[edit] - screenshot

0 Likes

#5

Did someone tested this? I’m interested in OSX, Linux opinions. There have been mayor improvements from the first version.

0 Likes

#6

Alright, this would be direly useful for me right now, too, but I need help getting it working. Note, I am not a programmer, I’m a writer, so please be gentle ;-p

So I think I’ve got it installed. It shows up as Preferences -> Package Settings -> BufferScroll. I’ve set sync_scroll to true in both Default and User, but nothing seems to be happening. Any idea what I should do?

Thanks,
Kensai

PS Just noticed one of the other intended effects of BufferScroll … maintaining folds from instance to instance. Sweet. That right there is a bit of help already, thanks.

0 Likes

#7

I disabled the functionality, because I requested to jon (the developer of this editor) for a new API which will improve overall performance. Sadly the request was completely ignore, using this package may degrade your experience, but the scrolling thing just works.

If you update the package via “package control - > update package” cloned views will sync ( if enabled )

Regards,and sorry for not be able to provide a good solution.

0 Likes

#8

Thanks for getting back to me. You know, what I lack in coding prowess, I make up for in sheer bull-headedness. I’ve been hacking at this off and on all evening, and just after I noticed you’d responded, I made one last try to get the package updated properly and it worked.

So far, the experience has been pretty much what I’d hoped for. The only thing really missing, from my point of view, is typewriter scrolling, so that where ever the cursor is placed remains centered while the columns scroll about in synch while typing. No big deal though. I’ll probably still be using a different editor for actual drafting work.

This, however, is allowing me to do something that all the writing specific apps, word processors and other editors have maybe come close to but never really close enough … I can now see the entire structure of a novel on screen at once. I use // commenting for scene headers already (picked up from using Writemonkey as my primary editor), and all other lines are naturally indented since they are paragraphs, so I’m easily able to fold to level 1 and see just those headers. The headers are descriptive so now I can easily fit the structure of what would normally fill 400+ pages in 3 columns, even on my 12" laptop (though a 21" widescreen monitor is certainly nicer).

Anyway, thank you very much for this.

Kensai

0 Likes

#9

Thanks, your feedback is appreciated.

Lucky you, I was able to add a setting and little programming to enable “typewriter scrolling”, disabled by default. Take a look to the preferences to enable it.

However, I’ve added this possibility for your usage and NOT because I recommend you to leave your current editor.
My opinion is: sublime text seems to be “work in progress for some undefined future with unknown plans”. Plugins are great, but these have lot of limitations and the community can’t do nothing about that. Just workarounds that may solve or not solve what a user needs from a text editor.

Regards

0 Likes

Ultra wide editing mode, multiple columns setup similar to a reading view, is this possible?
#10

Holy crap, tito. You did it. I was just mucking about over at the “always centered” thread in the plugin dev forum, figured out how to make a new plug from their sample stuff myself (good thing about that bullheadedness, eh?), and had the typewriter scrolling working. However, it only worked with an insertion point in the first panel. What you’ve done works in a middle panel in a 3 or 4 panel setup which is far more useful. Also, whichever way you went about implementing seems far more stable than what they had going. Then, of course, this means I only have one package running to do all this for me, and I’m a huge fan of that sort of elegance in my tools.

I doubt I’m leaving my editor. I just think I’ll be spending more time in ST2 for some stages of work. I love Writemonkey to death, but its got its own issues, and its certainly not the ideal tool for all tasks. I would kill for one unified, ergonomic customizable and beautiful app that could take my writing from notes and brainstorming through to finished content draft. As is, I use Resophnotes for note taking, research and some dev work (wish that guy would break down and allow themes, or at least allow me to set background and foreground colors myself; black on white burns my eyes, and I’m going to need those for awhile I think), a list in a text editor for outlining/plotting (this is where BufferScroll initially came in letting me efficiently apportion screen space so could actually see the whole outline at once rather than just a quarter or less of it, and its nice to be able to move pieces of the outline around using Ctrl+Shift+up/down rather than mousing), sometimes I get into TimeLine if I’ve got multiviewpoints getting tightly wound or if I’m plotting something out over very long stretches of time, including flashbacks and such that need to not trip over each other, then draft in text editor, revisions in text editor and/or Word and of course Word for final format (industry standard so can’t get away from it; then again, I used to be a pro with it, so it doesn’t bother me much other than its ugly and unreliable).

Anyway, short story long, you’ve added some great new tricks to my arsenal. Thank you, so much.

Kensai

0 Likes

#11

Hi Kensai,

I’m glad tito could provide a better solution for your workflow. I’ve been using the typewriter plugin you mention since January (with some fine-tuning) and have been quite happy. That said, I’m always interested in how other writers use Sublime, but I think I don’t understand how you use BufferScroll. Is there any chance you could throw up a quick screencast?

I would also be interested in any other useful things you’ve come across or put together for writing in Sublime. I’m putting together a package of my stuff as soon as I work out all this git stuff. Also, I was wondering what features Writemonkey (if I understood you correctly, that’s your primary editor) has that you cannot replicate in Sublime. (I don’t have an axe to grind here. I just like writing in text editors.)

Alex
/also not a programmer

0 Likes

#12


Alright, I’ve attached a shot. Sorry its from my 12" laptop so it may not be perfectly legible, but its demonstrating what I propose is a big, useful property of the BufferScroll plugin. What you see there is most of a standard length novel. Each line/paragraph starts with // for a few reasons, but here, having them unindented, and then every line/paragraph after each (the scene contents) are indented like paragraphs are meant to be means that they can automatically be folded in ST2. I like a single carriage return at the end of each scene so that when I do a Fold to Level 1 (custom keyboard shortcut), there’s that black space between them for instant visual separation.

The big point here is that I have a hard time holding a whole plot in my mind at once, or at least I have something of an irrational fear that I’ll keep leaving out bits and pieces, so I’ve been looking for a way to really see the whole structure of a book on screen all at once, even when I’m using a 12" laptop (big monitor in my office is obviously nicer, but it shouldn’t be a requirement, IMO).

Basically, what you see in that screenshot is simply opening my work in progress .TXT file that I have made primarily in Writemonkey (WM from here on out), doing a Fold to Level 1, then zooming out until the whole thing is visible. The reason this works is because I use //comments as scene headers in WM. WM treats //comments just as code would, saved in text, but not acted on in any other way. I’ve also set // as my bookmark string in WM which gives me a couple other ways to use those marks for very quickly navigating them. WM also allows 3 forms of syntax highlighting, //comments being one of them (headings and block quotes being the others) which may sound limited to most of the folk around here, but its a generous number of visual cues for an editor meant for fiction. I’ve set up ST2 to highlight the same stuff, though I generally stick to just //comments as when I try to work out meaningful ways of using the rest, it just gets messy. Both ST2 and WM have adequate search capabilities to make the whole thing moot, and seriously, I can only think of one case, which is not present in this manuscript where I might want to mark something that would end up printed in the finished book, so //comments are the primary marking as far as I can see.

Alright, we’ll start with ST2 … obviously, I’ve got my own theme. Less obviously, I’ve also repainted some of the default chrome (such as the transparent areas around the scroll pucks to make sure things stay as black as possible) and altered my plain text syntax file to get the highlighting I spoke of before (which, btw, matches my most commonly used theme in WM). I’ve set up a good number of User preferences and keybindings as I’m sure everyone around here does. I only have one plugin going and that is BufferScroll.

BufferScroll can do a few things, but the thing I was looking for that brought me to it was the “follow mode” functionality. What that does is allows you to clone the view of one file or buffer as these coder types say across multiple panes in ST2’s view so they form a continuous feed of the file all of which scroll about in a reasonable facsimile of synchrony. This provides the benefit of allowing you to constrain the width of your text column to where its easy to read, edit and create within while also allowing you to use pretty much all of your screen space. As in my screen cap, I’ve turned off tabs, sidebar, minimap, all of which I have personalized keybindings for, and then set the thing for fullscreen mode, so I’ve pretty much maxed out the utility of this tiny 12" screen more than I ever have before.

If I were working on a new book, starting from scratch, or at least not with a full 100-120K words in the file already, I would likely start out with a higher level of zoom for comfort, noting down the scenes I could think of using as //comments. Then I could write comments or actual bits of prose that might get used under each, indented, obviously so they can easily be folded out of the way at need. As the content built up, I could simply fold and zoom out when I wanted to look at the structure. Its also pretty easy, once you figure the trick to it, of cutting/pasting scenes about when looking at them in this fashion.

Now, the typewriter scrolling functionality that tito was able to add to BufferScroll while I was messing around with the posted snips on the “always centered” thread is superior in a couple of ways. First, its very stable and predictable by comparison. Second, it works regardless of which pane you have the cursor (the other one only worked in the first pane, which is no big deal if you’re only using one, but kind of a let down for what I had in mind).

What I had in mind is the ability to use this follow mode functionality combined with typewriter scrolling to where I could be working, centered vertically, in the middle of 3 columns, so that I could have a relatively broad field of vision inside a document while working. Even when I’m drafting new stuff at the end of the existing text, I like to be able to see further back than usually can in any text editor when comfortably adjusted. I usually feel like I’m building something, always needing to be able to look back just a bit to see where I need to steer things or what pieces I’m still missing (micro scale, words, sentences and paragraphs, not macro scale of scenes and arcs that I’m looking at when I’ve got everything folded up). This may not be important to any given person, and I’ve worked around it using various word processors and text editors (and notebooks, I suppose) since I was 12 (which was a very, very long time ago; lets just say, there was no internet, and there wouldn’t be anything worth using for close to a decade at that point) so I guess its not even that big of a deal for me. I’ve just got a strong hunch at this point, knowing myself pretty well by now, that once I get geared up with this new capability, it will help me. I might be able to write a bit faster, but I should certainly be able to write more strongly.

Alright then, you wanted to know about WM, too. Well, I’d strongly recommend just going over to writemonkey.com, DL the latest and look over the release notes for it because the author has added huge amounts of functionality, the center of which is the Jumps window (ALT+left/right is the easiest way to open that). Its at once not as nice as ST2’s side bar and way, way cooler. It doesn’t look as good as it started life as a bolted on feature that pops open in its own Windows chrome window, though recent changes have improved that significantly. It was originally intended as a way to find various, definable sorts of markings, like headings, quotes, tags, comments, bookmarks, etc, and included a filtering box to help find stuff in a document easily. Recent improvements have given Jumps the ability to act as a file/project manager, including the abilities to work with multiple files inside a single entity such as scenes/chapters inside a novel, and reorder them physically in the Jumps box, the ability to merge the files in the order you’ve set, and the ability to filter on tags inside a file as well as text in file names, and even just full text searching of all files in a given folder (uses the file system folder as a natural boundary for project management, though it doesn’t see sub folders unless you switch it to look inside just that sub folder), and all the filtering can be done with normal text or with regular expressions (not something I do, but it can be done, so if you end up with a weird sorting request, often it can be done with a regular expression, and someone in the community or the author himself will often be able to help you figure it out).

Anyway, WM has tons of functionality, though you don’t really need to use any of it if you don’t feel the need. Check out the F1 help card for some guidance. There’s some other stuff in the right-click, properties (F10) and progress (F12) menus. Reading through changelogs for older versions will turn up other features. As you can see right there, currently, documentation of what it can do is one of WM’s big weaknesses. Doesn’t bother me at all since I’ve been using it for years, growing up with it as it were, but its hard to really show off all the power to someone new to it. It looks great, IMO, and the ease of building new themes for it and switching between them is great. It supports Markdown and a couple other forms of markup via various forms of copy/paste and export (including CSS sheets for export). I haven’t messed with that too much, but it makes it a great blogging tool as well as being able to help move from the text editor and into Word with as little effort as possible so you can format a deliverable manuscript.

I don’t feel like I’m covering even half of it, but WM is a great writer’s editor, though not much use for coding. Its always had alot more under the hood than all the reviews I’d seen for it (text editor round ups where people just gloss over stuff, often complaining of the light green on dark green color scheme the thing ships with, for example, not even realizing/acknowledging that you could even change that if you wanted to, just like most other editors in this class). Heck, I’d even gone for years knowing about certain functions built in and never imagining that I’d ever have a use for them and then bang, wow, that feature really helps out in this situation, I can’t believe they had the foresight to add that way back when ;-p With the latest batch of expanded functionality, though, you can mimic or emulate a big honking chunk of the vaunted functionality of Scrivener, without that stiff Scrivener chrome trying to make you work in a particular way. Better yet, I’ve never lost any data using it (check the Scrivener for Windows forums for some horror stories; they’re still working on the beta bugs a year and a half after initial release and people are still having problems, big problems), the author is active on his forums and very responsive to discussion, and its free.

Anyway, my problems with and needs for software are always at least in some form a mental block on my part. I wrote several stories by hand in notebooks. Then my folks sprung for a Brother “word processor” for me my senior year of highschool meaning for me to use it through college (had a weird 2.5" floppy drive that could hold about half a novel and a massive, flip up, 4 line x 40 character LCD screen, and pounded out copy through its daisy wheel with enough vigor to shake my dorm tower from my 12th floor room), and I wrote a few more stories, a ton of papers and most of what would turn out to be my first novel on that. Then sophomore year in college I sprung for a 386 laptop with a black and white screen, with 4 meg of ram and an 80 meg harddrive that I had no idea how I’d ever be able to fill, that lasted me till a year out of school that managed an uncounted number of papers, essays, poem and most of two whole novels, all in Works for Windows 3.1. A year after that, I wrote a novel entirely in Word 97 (with the option for white text on blue background checked) on a variety of machines who’s speeds never rose above 200mhz. Things have all been downhill from there. I imagine I’m having a difficulty, then there must be something out there, outside of me, to correct for it, which is of course a load of hooey because I’ve done the work before, using just whatever tools at hand. Guess I’m lucky my handwriting sucks and it really hurts my wrist and elbow to do physically write for more than maybe 2 minutes at a time. Otherwise I’d probably be one of those crazy writers with a closet full of empty but very cool notebooks and very cool but still fully loaded pens ;-p

I say too much here just to drive home a point. This stuff is definitely cool and may really help you out. However, its is in no way necessary to do the work itself. Just ask the coders on this board. Any of them that aren’t brand new or low level hobbyists have worked in all sorts of editors and environments. If they code professionally, often they’re at the mercy of whatever process and tools they commute into. I have a good buddy who has coded for medical testing company and video game companies, moving smoothly from tool to environment to tool and frankly, I don’t think he even notices the differences. I’ve showed him ST2 and his response was, “Oh, that’s pretty. Maybe I’ll take a look at that when I get a chance,” meaning probably never because he’s full times supporting a new online game, part time supporting an old online game and looking to jump back to one of the medical companies in the near future, and when he needs a moment to decompress, he’s works on building a modern MUD that I doubt he’ll ever finish because he just like upgrading things, one component at a time, over and over, using some fairly recent version of MS Visual Studio.

Just write. The tools aren’t important. However, ST2 and WM are really easy on the eyes, even easier on the fingers and brain, and hey, they’re right here in front of you ;-p

0 Likes

#13

Ok, I could not get ‘follow mode’ to work.
Is it still active?
could you post an exact sequence of steps?

Thanks!

0 Likes

#14

Install bufferscroll
set the preference synch_scroll to true
view -> layout -> columns 2
with the focused file, go to File -> New view into file
Move the cloned view to the other column.
Restart sublime?

done?

0 Likes

#15

Awesome, it works!
This is a godsend!

One feature I like on WM is segment isolation.
Press F6 and the screen clears, leaving you with the single paragraph you are working on. Shift F6 does the same for the section (markdown).

Is there any way to replicate this in sublime?

0 Likes

#16

@Kensai, if you could share your .txt syntax mods (comments that fold, etc) that’d be nice.
I wonder how this all gets processed when it’s time to publish to html or word. The processors I know (rst, markdown) don’t like indented text like this, and don’t have comments. (btw, rst and markdown support in sublime is poor).

0 Likes

More than 4 columns?
#17

@Kensai,

I drafted a response to your post months ago but I somehow managed not to post it. I’m really sorry about that. I’ve rifled through my documents of that period, but I must have erased the file on the premise that I had posted it here. I was juggling a lot of balls at that time and this one dropped. Again, sorry.

What I had written (at much greater length than I will now) was to thank you for talking about your workflow and to agree with you about the tools. As David Allen (of GTD fame and indirectly responsible for more “productivity porn” than any other human being alive or dead) has put it: “Tools are cool and we need them, but you shouldn’t take them too seriously.”

I need to check out WriteMonkey more in-depth at some point. On the strength of your recommendation, I suggested it to someone I was collaborating with last spring and he was very pleased with it. (Although, for some reason, he became mistrustful of the key so that all his text came “formatted” as one paragraph – and it was almost all dialogue! That has since been rectified :smile: )

Alex

Edit: a minute after I posted this, I came across the precise quote above, so I corrected it and removed my reservations about it.

0 Likes