Sublime Forum

AttributeError: 'View' object has no attribute 'options'

#1

I’m probably going to look like a dumbass here but…

I just downloaded Sublime Text 2 for Windows. The very first thing I wanted to do was remove the line numbers. Search all over the menus and find nothing. So I google it which brings me to this page

sublimetext.com/docs/file-type-preferences

It says type view.options().set('wordWrap', False) in the console.

So I open the console and type

view.options().set('lineNumbers', False)

and I get this error.

>>> view.options().set('lineNumbers', False)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'View' object has no attribute 'options'

Are the docs out of date? Am I doing something obviously wrong? Thanks

0 Likes

#2

You came across the ST1 documentation. We should really request he take that down. Anyways, here are the unofficial docs (docs.sublimetext.info/en/latest/index.html). So for what you are trying to do it would be

view.settings().set("word_wrap", False) view.settings().set("line_numbers", False)

The official docs for settings.
sublimetext.com/docs/2/settings.html

0 Likes

Outdated documentation