vscode-sync-scroll icon indicating copy to clipboard operation
vscode-sync-scroll copied to clipboard

Global user settings for initial status of extension

Open TobiasWantzen opened this issue 3 years ago • 1 comments

It would be nice, if there would be global User settings (Preferences > Settings), which define the initial status of the extension for every new window or file view. All three states should be possible: NORMAL, OFFSET, OFF.

Up to now it is permanently set to NORMAL for splitted views.

TobiasWantzen avatar Jun 03 '22 04:06 TobiasWantzen

I second that. It starts scroll syncing automatically when viewing unrelated files. I have to turn it off when that happens. The times I need to sync scroll is less than the times I don't need to sync scroll. So the default (at least for me) can be off.

akinuri avatar Jun 25 '22 18:06 akinuri

Adding a +1 here, the default "on" state is always disruptive for me, and I find myself disabling the extension's default-on far more than actually using the extension. The synced scroll is incredibly handy for specific comparison use-cases, but those use-cases aren't particularly common, so the default-on state is nearly always incorrect for a newly-opened window/view.

kaedys avatar Dec 02 '22 19:12 kaedys

Since the last commit for this repo is dated back to April 2020, I’d like to show how I changed the extension to default-off.

  • After installation of the extension go to VSCode’s extension folder (on my Mac it resides here: ~/.vscode/extensions/) and edit this file ~/.vscode/extensions/dqisme.sync-scroll-1.3.0/out/states.js (An overview where you can find the VSCode extensions on Mac, Windows, and Linux can be found here: https://code.visualstudio.com/docs/editor/extension-marketplace#_common-questions)
  • Go to this line: https://github.com/dqisme/vscode-sync-scroll/blob/8568216d44385424e07913295c86f43a276a2613/src/states.ts#L50
  • Change protected defaultValue = ON_OFF.ON to protected defaultValue = ON_OFF.OFF, save, and restart VSCode, if it’s running.

This sets the extension to default-off. I hope, this helps ...

TobiasWantzen avatar Dec 03 '22 04:12 TobiasWantzen

Was having a look at this extension for a while. Did a personal fork in may but never finished implementing what I wanted ^^' But, it's now done! (programmers life about procrastination haha)

I made some improvements about adding settings to this extension, you can read more on the release I made here: https://github.com/Quentium-Forks/vscode-sync-scroll/releases/tag/v2.0.0 (Probably gonna add more features regarding all the tickets in this repo 👀)

Also, not creating a PR because the whole code style was rewrote. I might look at publishing this extension on the marketplace with the authorisation of @dqisme :)

QuentiumYT avatar Dec 04 '22 13:12 QuentiumYT

Exactly what I was looking for, @TobiasWantzen, much appreciated!

kaedys avatar Dec 06 '22 11:12 kaedys

@QuentiumYT thanks for going on maintaining it, and I am also open to accept a PR even if it changed code structure. :)

dqisme avatar Dec 07 '22 21:12 dqisme

Just a minute ago, I published a new release (v1.3.1) that now you can use the only one status bar item to change the mode with three options: NORMAL, OFFSET and OFF. And the default mode is OFF, so I hope it won't bother you when you open a new split panels workspace 😃

Please check it out, and thanks for your feedback 👍 @TobiasWantzen @kaedys @akinuri @QuentiumYT

dqisme avatar Dec 07 '22 23:12 dqisme

@QuentiumYT Especially thanks for your feedback that retrigger me into this extension, I will look into your re-version and maybe try to merge some ideas into this one, and I would be more than welcomed inviting you to collaborate on it together if you wish. 😃

dqisme avatar Dec 08 '22 00:12 dqisme

Thanks @dqisme for coming back to this extension! It was late yesterday and couldn't create a PR directly. Sadly it breaks my fork with the new global mode, but it looks interesting! Thanks for your proposition, I'm not an expert with typescript but I can always do some PR if I see something useful to add :)

QuentiumYT avatar Dec 08 '22 07:12 QuentiumYT