Home Download Buy Blog Forum Support

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

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

Postby greggman on Sat Mar 09, 2013 11:40 pm

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

http://www.sublimetext.com/docs/file-type-preferences

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

So I open the console and type

Code: Select all
view.options().set('lineNumbers', False)


and I get this error.

Code: Select all
>>> 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
greggman
 
Posts: 1
Joined: Sat Mar 09, 2013 11:35 pm

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

Postby skuroda on Sun Mar 10, 2013 5:45 am

You came across the ST1 documentation. We should really request he take that down. Anyways, here are the unofficial docs (http://docs.sublimetext.info/en/latest/index.html). So for what you are trying to do it would be
Code: Select all
view.settings().set("word_wrap", False)
view.settings().set("line_numbers", False)


The official docs for settings.
http://www.sublimetext.com/docs/2/settings.html
skuroda
 
Posts: 367
Joined: Fri Oct 05, 2012 8:11 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest