Home Download Buy Blog Forum Support

Follow-mode for Sublime?

Follow-mode for Sublime?

Postby jseliger on Sat Mar 24, 2012 3:29 am

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.)
jseliger
 
Posts: 1
Joined: Sat Mar 24, 2012 3:24 am

Re: Follow-mode for Sublime?

Postby jps on Sat Mar 24, 2012 6:26 am

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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Follow-mode for Sublime?

Postby tito on Sat Mar 24, 2012 6:49 am

I'm trying to add this to bufferscroll. It would be nice if the bug in set_viewport_position get a fix. =)
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Follow-mode for Sublime?

Postby tito on Sat Mar 24, 2012 8:46 am

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 http://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:
Code: Select all
{
   "synch_scroll" : true
}


If not add this:
Code: Select all
   ,"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.

Image

[edit] - screenshot
Last edited by tito on Mon Mar 26, 2012 1:14 am, edited 1 time in total.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Follow-mode for Sublime?

Postby tito on Mon Mar 26, 2012 1:12 am

Did someone tested this? I'm interested in OSX, Linux opinions. There have been mayor improvements from the first version.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Follow-mode for Sublime?

Postby Kensai on Wed May 16, 2012 11:19 pm

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.
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Re: Follow-mode for Sublime?

Postby tito on Thu May 17, 2012 2:08 am

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.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Follow-mode for Sublime?

Postby Kensai on Thu May 17, 2012 5:49 am

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
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Re: Follow-mode for Sublime?

Postby tito on Thu May 17, 2012 5:46 pm

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
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Follow-mode for Sublime?

Postby Kensai on Thu May 17, 2012 10:47 pm

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
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 12 guests