tags:

views:

531

answers:

3

I started using NetBeans for Python development, and so far it looks pretty good. One thing that bothers me is that when I highlight a few lines of text and hit the Tab key, it doesn't do what almost every other editor does, but rather just adds four spaces at the end of the block.

I know NetBeans has a block indent action (somewhat oddly called "Shift Right"), but it seems impossible to bind the Tab key to anything. For now I've settled on Ctrl+Shift+I for block indent as a tribute to my Delphi days, but really, I'd just like make it work like Eclipse/IntelliJ/Notepad2 and do a block indent on Tab.

Any tips?

EDIT: OK, so it seems that this behavior only occurs if I select a bunch of lines and the cursor is positioned on an empty line. This looks like a bug, so I'm going to file a report.

Thanks guys!

EDIT 2: In case anyone's interested, Issue 155735

A: 

Had you changed the default keys at some point? Tab works for block indent for me.

Michael Myers
Works as expected for me as well.
Herms
A: 

Tab should indent the selected lines, and Shift-Tab dedent. The behavior you're describing sounds like a bug. Can you open the keybindings dialog and see what your Tab key is bound to?

Another thing you could try is clearing your userdir in case there is old cruft in there.

If these things don't work, please file an issue so we can reproduce and track this down -- http://scripting.netbeans.org/issues/enter_bug.cgi?component=python&issue_type=DEFECT

-- Tor

Tor Norbye
Always nice to hear from the developer
itsadok
+1  A: 

This should be fixed now - in build #415 and later from http://deadlock.netbeans.org/hudson/job/python/ . Thanks for the bug report.

Tor Norbye