Sublime Forum

BufferScroll

#41

Interesting to have different views with different color schemes. I’ve added an option to save the color scheme and also as a plus the syntax. =)

Here how you change a color scheme for a view.

1 - With the preference “remember_color_scheme” set to “true” you change the color scheme. For example by selecting IDLE.
2 - You close the file ( this will save the data for the view )
3 - You select again your previous “color scheme”

Now, every time you open the file IDLE will be set.

But, there is a problem!

Sublime allow to change the “color scheme” for the application. But will not overwrite views with a custom “color scheme” set, which is good.

To change the color scheme from IDLE you need first to “forget the color scheme of the view” by clicking Menu -> Preferences -> Color Scheme Forget.

0 Likes

#42

yay, thanks soo much, works great!

0 Likes

#43

I completed a full rewrite of this package some days ago. I fixed some problematic exceptions that were present in previous versions and it works faster.

**To remember:
**This package started as a project to save the scroll position between sessions.
Now it saves everything about a view. (scroll, bookmarks, folds, marks, selections and syntax )

Additional features:
1 - Has the optional ability ( by default set to false ) to synch bookmarks, folds and marks between cloned views. A bookmark or fold will appear automatically in other cloned views. This was requested by user outer7
2 - if you folded something and then unfolded, with this plugin you can call to “refold” ( if the view content was untouched – if not fold will appear in funny positions ) This may can be improved a little more.

If you tried this package in the past but were frustrated with the result give it another try and report any problem.

Limitation:
- Currently the data taken by this package is saved when the focus of a view is lost. This is obviously not optimal. This is a limitation of sublime text which is not dispatching the events “on project open/closed” and “on application close”
- There seems to be a problem with sublime text setting scroll position of some file types as xml, html and txt when these are loaded.

0 Likes

#44

Hey,

I’m not sure what’s going on but I have a major bug after installing this add-on. If I bookmark one line, then bookmark another above it, the one below it is frozen and can’t be toggled. This isn’t the exact behavior as sometimes the bookmark can be below but all I know is whenever I add two bookmarks, one after another without toggling, one of them freezes up. I get bookmarks stuck everywhere and I’ve had to uninstall this add-on.

By the way the only functionality I had on was the save bookmarks. I really like the idea of that feature but the add-on needs to be fixed.

0 Likes

#45

Apparently removing the package didn’t fix the problem.

Upon further review I realize the problem is that my bookmarks don’t just bookmark the line, but the exact spot in the line (even though there is no indication where that is!). In order to clear the bookmark I have to know exactly what place in the line the cursor was at when I toggled it. Maybe I just never ran into this problem before but is this default Sublime behavior? I think it’s terrible design choice, even with indicators of where in the line your bookmark is, you only need a bookmark for the line, not the exact spot in the line.

Is there a way to force bookmarks to only toggle on the line, not the spot within the line?

0 Likes

#46

[quote]Upon further review I realize the problem is that my bookmarks don’t just bookmark the line, but the exact spot in the line (even though there is no indication where that is!). In order to clear the bookmark I have to know exactly what place in the line the cursor was at when I toggled it. Maybe I just never ran into this problem before but is this default Sublime behavior? I think it’s terrible design choice, even with indicators of where in the line your bookmark is, you only need a bookmark for the line, not the exact spot in the line.
[/quote]

Correct!

Request or search the forum for this problem.

0 Likes

#47

hi,
ty for the plugin but lastly it doesn’t auto scrool to the line in which there’s the caret…

tips? ty

0 Likes

#48

Sorry I have no idea what are you talking about. Some step by step instructions will help.

0 Likes

#49

BufferScroll, at least the typewriter scrolling feature doesn’t seem to work in the Sublime Text 3 beta. Does anyone have a fix for that?

Thanks.

0 Likes

#50

@macosxguru For typewriter scrolling I use a plugin made by some forum regulars. I just cleaned it up and pushed it to github 1 for my own use. It works fine for me but doesn’t support cloned views and so on. Maybe it will be useful to you until @tito updates BufferScroll.

Alex

0 Likes

#51

@quodlibet, thanks for that. I am going to try it out. Thanks again.

macosxguru

0 Likes

#52

[quote=“quodlibet”]@macosxguru For typewriter scrolling I use a plugin made by some forum regulars. I just cleaned it up and pushed it to github 1 for my own use. It works fine for me but doesn’t support cloned views and so on. Maybe it will be useful to you until @tito updates BufferScroll.

Alex[/quote]

Thanks again Alex. I installed it, and it works perfectly. Made it possible for me to switch to SublimeText 3 full time. thank you again.

macosxguru

0 Likes

#53

Hope BufferScroll can support sublime text 3.

0 Likes

#54

I am loving the typewriter scrolling functionality but am wondering if anyone thinks it would be even better if the user could define the location the active line would be at, perhaps through a percentage. I like the to keep my active line at about 33% down from the top of the screen.

0 Likes

#55

That’s a really good idea : )

0 Likes

#56

I’m happy to announce this plugin nows supports ST3 github.com/SublimeText/BufferScroll/tree/st3 The first of the serie :stuck_out_tongue:

There is some bugs, mostly present in ST2: Work in progress… have hopes.

ヘ The application does not have an event listener for when you swtich, open or close projects, and windows, then this package can’t save the data for the focused files. You will lost scroll position of last focused file. By not providing these listeners, this package has suboptimal methods for saving it’s data. Such listening change of views, focus lost, file closing, saving, etc. If you don’t hit any of these event, the package will lose the data for last focused file.

ヘ For some reason sublime API is not restoring scroll of xml/html documents, including: xml, tpl, html, xhtml See: viewtopic.php?f=5&t=3503&start=20#p22324

ヘ There is no event listener for when a view is scrolled, then this package, has another suboptimal way of listening for changes of scroll, such tracking the scroll every x time.

:smile:

0 Likes

#57

Nice, like it very much! One more issue I’m getting - when I close sublime I lose folding in files. Is that in bug list as well?
Also I’m getting following error in console, is there anything I can do to fix it?

Traceback (most recent call last): File "D:\Program Files\Sublime Text 3\Data\Installed Packages\BufferScroll.sublime-package\BufferScroll.py", line 181, in <lambda> File "D:\Program Files\Sublime Text 3\Data\Installed Packages\BufferScroll.sublime-package\BufferScroll.py", line 186, in write File "X/gzip.py", line 183, in __init__ FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Program Files\\Sublime Text 3\\Data/Settings/BufferScroll.bin.gz'

0 Likes

#58

Ahh, may the folder does not exists?

Please update and let me know.

0 Likes

#59

Yep, no errors - folder and file were created. Almost perfect! :smile:

Here are steps to reproduce minor issue with folding:

  1. Open file where you can add foldings
  2. Fold piece of code
  3. Save
  4. Just close sublime without closing file first
  5. Open sublime - you’ll see that foldings are not remembered

If in step 4 you close the file before closing sublime then, after sublime restart, when you open the file foldings will be in place.
Other than that it is great, thanks man!

0 Likes

#60

Imposible to restore something if on_load is not dispatched when opening the application.
github.com/SublimeText/BufferSc … dbe251a4be

[code]+ # TODO the application is not sendinng on_load when opening a window,

  • then there is this hack which will simulate on_load when you open the application

  • since this is just a hack, there is a terrible noticeable delay, which just sucks, thank you.

  • for view in sublime.active_window().views():
  • BufferScrollAPI.on_load(view)
    +[/code]
0 Likes