Sublime Forum

Hiding line numbers in ST3

#1

Hello ( ´ ▽ ` )ノ

I am very new in this. i hope such simple question is okay!:

in Preferences.sublime-settings — User, i write this:

to hide line numbers. but I get this error:

Error trying to parse settings: Unexpected trailing characters in Packages/User/Preferences.sublime-settings:8:1

so, what is wrong with my curly bracket? I have checked all similar topics and still I cannot understand.

Thank you (✿*‿*)

Alice

0 Likes

#2

Looks like what you’re trying to do is set up a key binding to toggle the display of line numbers.

If that is indeed the case, you have put the key binding in the wrong file; you should select Preferences > Key Bindings and add the binding to that file, then remove it from the preferences where your screen shot above shows it.

When you add it to the bindings file, make sure that you put it in between the [ and ] that surround all of the content in the file, and if you have more than one binding in there all of the entries need to be separated from each other with commas.

The error message above is telling you that starting at line 8, column 1 there are unexpected characters in your Preferences.sublime-settings file. Having a curly brace in that position violates the syntax of the configuration file.

Sublime uses JSON for many of it’s configuration files which includes the sublime-settings and sublime-keymap formats.

2 Likes

#3

OdatNurd thank you! (✿ :heart::heart:) it works! So this is then my first ST customization ever (*^▽^)—b

0 Likes

#4

Alternatively you could install Package Control:

https://packagecontrol.io/installation

and use one of the following packages for hiding the line numbers and other parts of the UI temporarily:

or browse other great packages:

https://packagecontrol.io/browse

I also suggest reading the:

0 Likes