indenting with less or greater character does not work

Bug #640102 reported by Stefan Bethge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ViGedit
Triaged
Undecided
Unassigned

Bug Description

although there seems to be code for it, indenting only works with the tab key. less than/greater keys only switch back and forth between insert and command mode

Revision history for this message
Stephen Moore (delfick) wrote :

Turns out the current implementation requires you also have the "indent lines" plugin enabled.

I believe this plugin comes with gedit by default.

Changed in vigedit:
status: New → Invalid
Revision history for this message
Stefan Bethge (kjyv) wrote :

Ah, I found out that since gtksourceview can do it on its own since gedit 2.30, the plugin no longer exists.
See here: http://osdir.com/ml/gedit-list/2010-04/msg00019.html
Probably I have a more recent version so maybe its possible to use whatever exists?

Revision history for this message
Stephen Moore (delfick) wrote :

hmmm, that's inconvenient......

Another thing to add to my list for when I free time again :D

Changed in vigedit:
status: Invalid → Triaged
Revision history for this message
Stefan Bethge (kjyv) wrote :

seems like the snippet plugin is doing some indentation computation of its own.
I couldn't find a gtksourceview function in gedit that does the indent, it probably has the tab handling built in. Uhh...
So it might be necessary to use something like:

doc = window.get_active_document()
doc.get_insert_spaces_instead_of_tabs()
doc.get_tab_width()
doc.get_indent_width()

or copying the stuff Snippet.py is doing.

Revision history for this message
Stefan Bethge (kjyv) wrote :

I did some work on indenting with the indent/tab_width information but I don't know if there isn't an easier way.
It only works for single lines atm, see my commit 89 and 90.
Also I made the tab key get through so it also allows indenting/other plugins. Shift-Tab needs to be in that list but modifiers need some more work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.