Sublime Forum

BracketHighlighter in Sublime Text 3 not working

#1

I’m using Ubuntu 13.04 64bit

  1. Fresh install subl3 from webupd8 repo
  2. Install BracketHighlighter by going to ~/.config/sublime-text-3/Packages/User and

git clone -b BH2ST3 git://github.com/facelessuser/BracketHighlighter.git "BracketHighlighter"

Now, menu in Tools > Packages > BracketHighlighter is unactive and all settings in Preferences > Package Settings > Bracket Highlighter are empty, but they are not empty in config files in ~/.config/sublime-text-3/Packages/User/BracketHighlighter. Moreover, when I want to save new settings to Bracket Settings - Default I’m getting this error:

Unable to save ~/.config/sublime-text-3/Packages/BracketHighlighter/bh_core.sublime-settings Error: unable to create tmp file in /home/user_name/.config/sublime-text-3/Packages/BracketHighlighter.

EDIT
Saving to Bracket Settings - User is working but this not solving problem with BracketHighlighter.

What’s wrong? How to solve this? Launching sublime by sudo subl don’t solve this problem. I was trying to install sublime 3 from official .deb package too - nothing changed at all.

0 Likes

#2

Install packages with Package Control, and save headaches and time to Package developers :smile:

1 Like

#3

I don’t think this is a solution. I’ve done that but there is only package for ST2. It worked but I was getting this error

Error trying to parse settings: Unexpected trailing characters in Packages/User/bh_core.sublime-settings:4:16
0 Likes

#4

@curiousman Are you sure you’re using ST3? The error you reported looks like something ST2 would say. Is it possible that you’ve installed ST3 side-by-side with ST2 and are running the old version?

Anyway. The “canonical” steps for doing this would be something like:

  • Make sure you’re using ST3.
  • Backup (or delete) ~/.config/sublime-text-3 (this is known as a revert).
  • Install PC for ST3: sublime.wbond.net/installation#st3
  • Restart ST3
  • Open the Palette (Ctrl+Shift+P), seach for “Install Package” and then for “BracketHighligher”. Install the package.
  • Restart ST3 (may not needed)
  • Enjoy!

Alex

0 Likes

#5

I’m using only build 3047.
I’ve done everything as you said and it seems to work (with BracketHiglighter for ST2), but for example, when I change User Settings of Sublime nothing has changed. And I can’t change nothing in Default Settings (I’m 100% sure I was able to do it in ST2). I don’t know what is going on…
EDIT
It started to reading my settings from User Settings when I deleted BracketHiglighter. It’s strange but I’ll never install it again :wink:

0 Likes

#6

I assure you BracketHighlighter works just fine for ST3…I use it everyday with the latest ST3.

If you are using Package Control 2.0 (it must be the latest 2.0 version) to install BracketHighlighter, make sure you delete the folder Packages/BracketHighlighter. PackageControl installs the Package in Installed Packages/BracketHighlighter.sublime-package. If Packages/BracketHighlighter exists, it will override the **.sublime-package ** version.

If you are getting errors in the linux version, please post the console errors here if any. I cannot think of anything Linux specific that would need to be done. I use BH on Windows and Mac with no issues, but I rarely fire up Sublime in linux anymore, so linux users need to post errors from the console here if any are found. If any are found, I will dust off my linux machine and get to work.

0 Likes

#7

@curiousman

BH3 works in ST3, build 3053 (on Ubuntu 12.04, not that it matters). I just tried it.

The steps I outlined above should work.

Use the palette to turn it on/off so you can test it. (There’s a command called Bracket Highlighter: Toggle Global Enable.) You should start seeing bracket symbols in the gutter, when your cursor is between brackets, quotes, etc.

Do not edit the Default settings because they will get overwritten after every update.

Settings generally come in twos:

Package-name/Package-name.sublime-settings (Default)
and User/Package-name.sublime-settings (User)

You look at the former file to understand the settings and then copy & paste them into the latter (which you have to create the first time). Does this make sense?

BH is a little more complicated. There are three setting files and you may need to tweak your colour scheme as well. Read the README carefully.

It works just fine.

That said, you might want to change the description of the package in Github so that it doesn’t specify “Sublime Text 2”. This appears underneath the package name when you’re installing and is a little misleading for ST3 users. The ST3 section of the readme needs a tweak as well.

Alex

0 Likes

#8

Updating the readme of all of my plugins is on my list. Maybe I will hit BH today since it is the most popular of my plugins.

0 Likes

#9

Hi Facelessuser!
I hope you’ve managed to solve but could not install it normally on your sublime text 3 then download it on github
github.com/facelessuser/Bracket … BH2ST3.zip

Unzip and then copy the same file and replace it in the plugin installation folder
C: \ Users \ YOUR_USER \ AppData \ Roaming \ Sublime Text 3 \ Packages \ User

That will absolutely solve. Hope this helps! @

0 Likes

#10

You just need to use Package Control 2.0 (the latest). You don’t have to manually do anything anymore. Just select BracketHighlighter in Package Control and it pulls down the correct package. Make sure you uninstall any copies of BracketHighlighter you already have installed.

0 Likes

#11

I forget if I downloaded zip from github or elsewhere, it just does not work. I deleted it from folder then installed in package control, everything works fine now.

0 Likes

#12

BH is meant to work through Package Control and that is the recommended way it is is to be installed.

It can be installed manually though https://facelessuser.github.io/BracketHighlighter/installation/#manual-installation. The complexity is due to dependencies.

If you’ve installed via Package Control, you can also do a git checkout and override the “installed” source with the latest git master branch, which is what I do when developing on it, but not recommendd for general usage.

0 Likes