Sublime Forum

BufferScroll

#67

Alright, after much futzing around with things (basically just trying the same things over and over, restarting ST3, over and over, yada yada yada), it seems to be working properly now. For now ;-p Of course, having to be this stubborn to get a plugin to activate still seems to suggest some small incompatibility between BS and ST3 or beta bugs just on ST3s side. Here’s hoping it keeps working, because other than this little headache, ST3 is looking like even more of a hotrod than ST2 was after I’d tricked it out.

Thanks tito.

0 Likes

#68

Kensai,

I think is not your fault, but a malfunctioning of the package. I reviewed the last days the functionality and made a little tweak to the sync scroll logic. Maybe you want to update, and let me know if still present issues. I was able to reproduce the problem at first, but not lately, so I *think *is fixed.
github.com/SublimeText/BufferScroll/tree/st3

Regards,

0 Likes

#69

How are you guys installing this for Sublime Text 3? ST3 appears to want it’s packages as .sublime-package files and BufferScroll does not install like that when cloned from GitHub.

Are there some instructions on how to do it somewhere?

0 Likes

#70

Whether we can make a selection with:

  • only folded region
  • only non-folded region (simply excluded fold-marker)
    ?
0 Likes

#71

Done :slight_smile:

0 Likes

#72

Whao, that’s so fast, thank you.
window.run_command(“buffer_scroll_fold_select_folded”)
window.run_command(“buffer_scroll_fold_select_unfolded”)

0 Likes

#73

I suggest changing BufferScrollFoldSelectUnfolded to:

class BufferScrollFoldSelectUnfolded(sublime_plugin.TextCommand): def run(self, view): folds = [item.a, item.b] for item in self.view.folded_regions()] if folds: self.view.sel().clear() prev = 0 for fold in folds: # sublime.message_dialog(self.view.substr(fold[0])) self.view.sel().add(sublime.Region(prev, int(fold[0]))) if self.view.substr(fold[1]) == "\n": prev = int(fold[1]) + 1 else: prev = int(fold[1]) self.view.sel().add(sublime.Region(prev, self.view.size()))

0 Likes

#74

Done, thanks :slight_smile: Didn’t test it :stuck_out_tongue:

0 Likes

#75

Is ST2 no longer supported for this plugin?

0 Likes

#76

Nope, if possible consider upgrading, not only it works better and faster, you will also support work invested into new versions. Unless there is one of the few bug that may affect your setup, just upgrade.

0 Likes

#77

I made some updates, and recovered some lost functionality. In theory it should restore scroll and selections in all the situations… did I broke something!?

0 Likes

#78

Just started using Sublime text recently. I was wondering if you (Tito) would be willing to post the zip for the latest compatible bufferscroll for Sublime text 2, as you did for sidebar enhancements. I will eventually try out sb 3, but am new to advanced text editors, and have only started setting up sb 2, so I don’t want to jump ship just yet. Either way, thanks for your efforts. This package sure does look useful! Thanks!

0 Likes

#79

I’d suggest you to go dirrectly on ST3. Despite its beta status, it’s super stable.

Besides that, you will find ST2 compatible packages harder and harder :smile:

0 Likes

#80

Yes, be safe and use ST3. :slight_smile:

0 Likes

#81

From viewtopic.php?f=3&t=17110&p=67114&hilit=bufferscroll#p67114

Basically all I'm hunting for in such a plugin is a fixed scroll point that is 1/4th to 1/3rd the way up the screen, without taking any of the usual functionality away, especially not something that gets used all the time, such as setting the insertion point via mouse click.
I just added option in BufferScroll to shift from the “centred” line by any amount, positive or negative number of lines. So you can keep the scroll point anywhere

0 Likes

#82

EDIT: Nevermind, the author fixed this in a matter of minutes!

Hi, bug report here.

It seems that along with the wanted properties the current set syntax is also saved. This means that setting a new default syntax for a given extension will not work, since the new defualt will be immediately overwritten with the one saved by your plugin.

Steps to reproduce:

  • Open a file
  • View > Syntax > Open all with current extension as…
  • Select the desired new default syntax
  • Open a different file with the same extension

The file will be opened with the previous syntax and not the new default one. You may also notice in the bottom right hand corner a brief change in the selected syntax when the plugin overrides your choice. If you disable the plugin and repeat the steps everything will work as expected, proving the issue.

Workarounds:

  • Disable the plugin
  • Manually set the new default syntax for every file
0 Likes

#83

Guys, has anyone got a problem like me that on sublime text 3 the buffer scroll doesnt remember folds? It just resets them after a few seconds, or when a file is saved. What is wrong?

0 Likes

#84

must be some preprocessor or something like that. also if a file is reloaded the editor does not send the on_reload event

0 Likes

#85

Where does BufferScroll keep its state? I’d like to keep that shared between my different computers.

1 Like

#86

BufferScroll use the file path of the file as key to keep the state and that is highly unlikely the same on different computers. Thats why is not saved on the packages folder.

In any case the path is Packages/…/Settings/BufferScroll.bin.gz

0 Likes