ActiveState Komodo Edit?

J

John Doe

Having trouble tabifying a section of Python code.
Code -- Tabify Region
Does it work for anyone else?

Thanks.
 
G

George Sakkis

Having trouble tabifying a section of Python code.
Code -- Tabify Region
Does it work for anyone else?

Yes it does, you have to select a region before (e.g. ctrl+A for the
whole file). Regardless, the common standard indentation is 4 spaces;
avoid tabs if you can.

George
 
D

Dave Angel

John said:
Having trouble tabifying a section of Python code.
Code -- Tabify Region
Does it work for anyone else?

Thanks.
Hello JD,

I'm using Komodo IDE 5.1.1, and tabify works fine, with a column setting
of 4. However, I'd never tabify Python source code, not sure why you
need the feature. I only use untabify, and that on sources that come
from somewhere else. I also configured it to make tabs visible, which
makes it a lot easier to see what's happening. (Or else it defaulted
that way; anyway, it's much easier to see what's going on when tabs and
spaces are visible)
 
J

John Doe

George Sakkis said:
Yes it does, you have to select a region before (e.g. ctrl+A for
the whole file). Regardless, the common standard indentation is 4
spaces; avoid tabs if you can.

Actually, what I was looking for was indent, not tab.
And I found that in the menu.

Another question...
There is a region on the left margin to the left of the code and to
the right of the outlining area, in between the code and the
outlining area. It looks like an area used to select lines. But
dragging the pointer down that area does nothing apparent. Isn't
that supposed to select lines of text? Maybe I have colors set
wrong, but selected text does show up when selected other ways. Or
maybe that area is nonfunctional, left over from the IDE?

Thanks.
 
D

Dave Angel

John said:
Actually, what I was looking for was indent, not tab.
And I found that in the menu.

Another question...
There is a region on the left margin to the left of the code and to
the right of the outlining area, in between the code and the
outlining area. It looks like an area used to select lines. But
dragging the pointer down that area does nothing apparent. Isn't
that supposed to select lines of text? Maybe I have colors set
wrong, but selected text does show up when selected other ways. Or
maybe that area is nonfunctional, left over from the IDE?

Thanks.
Quickest way to indent multiple lines is to select them, then press
tab. However, there is a a menu item for it, Code->Increase Line Indent.

In the Komodo IDE, the region you're describing is used to set
breakpoints. As far as I know, there's no specific 'select lines' mouse
action, you just select characters that happen to constitute whole lines.
 
J

John Doe

....
Quickest way to indent multiple lines is to select them, then
press tab.

Thanks.
Useful because I usually paste blocks of code.

Lastly... Is there a way to force the editor to open text (*.txt)
files as Python files so that they are color-coded? Without changing
the *.txt extension? I will be editing text files that are part of a
Python program (Dragonfly). Having the text color-coded will help. I
can probably make a script to do a workaround, but being able to
just hit the Save button would be best.

Thanks.
 
D

Dave Angel

John said:
...



Thanks.
Useful because I usually paste blocks of code.

Lastly... Is there a way to force the editor to open text (*.txt)
files as Python files so that they are color-coded? Without changing
the *.txt extension? I will be editing text files that are part of a
Python program (Dragonfly). Having the text color-coded will help. I
can probably make a script to do a workaround, but being able to
just hit the Save button would be best.

Thanks.
I haven't tried it in Komodo IDE, but there is a preferences item called
File Associations. In it, try choosing *.txt, and change the language
drop-down to Python. Presumably when you're done with the special case,
you'd change it back to "text file"
 
J

John Doe

....
I haven't tried it in Komodo IDE, but there is a preferences item
called File Associations. In it, try choosing *.txt, and change
the language drop-down to Python.

Did that.
Presumably when you're done with the special case, you'd change it
back to "text file"

Apparently works great (except for some strange GUI behavior in that
dialogue, but that is a completely different, minor issue). For some
reason, seems Komodo does not allow itself to be configured from
Windows file types to open text files, but that is not necessary or
even desirable here. I will just have it open the last files being
worked on. Apparently the editor behaves the same way as it did for
Python files. Thanks.
 
T

Trent Mick

John said:
Another question...
There is a region on the left margin to the left of the code and to

BTW, we call those regions "gutters" of the editing area.
the right of the outlining area, in between the code and the
outlining area. It looks like an area used to select lines. But
dragging the pointer down that area does nothing apparent. Isn't
that supposed to select lines of text? Maybe I have colors set
wrong, but selected text does show up when selected other ways. Or
maybe that area is nonfunctional, left over from the IDE?

If you make line numbers visible (View -> View Line Numbers) then you
can do what you want in the line numbers gutter.

Cheers,
Trent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top