Re: [gedit-list] Tab meaning



Hi Jesse, thanks for your quick response.

On 15 April 2010 12:32, Jesse van den Kieboom <jessevdk gnome org> wrote:
The idea, I think, is then to use the following settings:

tab-width: 4
indent-width: 2
insert-spaces-instead-of-tabs: True

See the gtksourceview API documentation for more information on these
properties. In gedit, you can very easily try out different settings
using the Python Console plugin. In the bottom pane of this plugin, type:

doc = window.get_active_document()
doc.set_insert_spaces_instead_of_tabs(True)
doc.set_tab_width(4)
doc.set_indent_width(2)

This is great, the only problem I had was that the gtksourceview object (to which the functions you mention belong) is not obtainable from the document object, but from the view object.

The documentation here makes this clear:

http://live.gnome.org/Gedit/PythonPluginHowTo

Thanks,

- Peter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]