jamalsenouci / sublimetext-syntaxfold

Sublime Text Plugin that provides a configurable command and popup for folding code based on syntax
MIT License
40 stars 6 forks source link

Does this work in Sublime Text 3? #16

Closed IPWright83 closed 7 years ago

IPWright83 commented 8 years ago

I've just installed in Sublime Text 3 - and attempted to get it working with C# style regions in JavaScript:

//#region Test
 CODE
//#endregion

using the following config:

{
   "endMarker": "//#endregion",
   "name": "JavaScript #region",
   "startMarker": "//#region"
}

But I can't seem to get the plugin to do anything?

jamalsenouci commented 8 years ago

Hi,

I'm not able to check this at the moment as I'm out of the country but it is probably to do with the backslashes as it will be reading them as escape characters. Try adding 4 instead of 2 On 29 Mar 2016 19:04, "IPWright83" notifications@github.com wrote:

I've just installed in Sublime Text 3 - and attempted to get it working with C# style regions in JavaScript:

//#region Test CODE //#endregion

using the following config:

{ "endMarker": "//#endregion", "name": "JavaScript #region", "startMarker": "//#region" }

But I can't seem to get the plugin to do anything?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jamalsenouci/sublimetext-syntaxfold/issues/16

IPWright83 commented 8 years ago

I gave it a quick try but no joy. I'll keep an eye on this issue though, if you get some time to look at it when you're back in the country that'd be much appreciated!

If not I might try to figure out how to debug sublime plugins sometime!

jamalsenouci commented 8 years ago

I've just tried it out with your initial config and it does work if i used the command palette to run the fold all command (ctrl + shift + p and search "syntaxfold fold all") but the keybinding seems to be conflicting with a default keybinding. I am not sure whether that is a new shortcut as it hasn't been a problem before. I'm guessing this is what the issue is.

I will have to change it but in the meantime you can change your keybindings by going to preferences > browse packages > syntaxfold and adjust the .sublime-keymap file for your platform or just fold using the command palette.

YourFutureHusband commented 6 years ago

I am having the exact issue as was described in the last comment by @jamalsenouci . It used to work perfectly and now I can only get it to work by using the command pallete commands. Anyone found a solution?

jayseweaver commented 6 years ago

@REVERSE-MISAYA , any luck since? I was a little confused until I took a closer look at the .sublime-keymap file:

// Toggle fold current code block { "keys": ["alt+1", "alt+1"], "command": "toggle_fold_current"},

The new default keybind is just to press the old keybind twice. Of course, you can just change it as @jamalsenouci suggested - I just did this with no issues.