This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 14285 - [indentation] TAB reformats line
Summary: [indentation] TAB reformats line
Status: RESOLVED DUPLICATE of bug 30147
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-08-09 08:55 UTC by David Konecny
Modified: 2007-11-05 13:39 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2001-08-09 08:55:22 UTC
From: Angus Mezick <amezick@edgil.com>

Have an action that could be remapped to the tab key and does the following:

re-formats the current line.
if line is blank,  
  move the insertion point to the correctly indented location.
else
  re-formats the current line.
  if the insertion point is in the indented area (before the first 
     character on the line)
    move the insertion point to the first character of the line.

From emacs c-mode:
c-tab-always-indent's value is t

Documentation:
*Controls the operation of the TAB key.
If t, hitting TAB always just indents the current line.  If nil,
hitting TAB indents the current line if point is at the left margin or
in the line's indentation, otherwise it insert a real tab character.
If other than nil or t, then tab is inserted only within literals
-- defined as comments and strings -- and inside preprocessor
directives, but line is always reindented.

I like to define this as 't' so that I can indent anytime anywhere and not
care about how many spaces or how many levels.  This is very useful to
double check to make sure that you aren't missing a paren, brace, or
bracket.
Comment 1 Jan Chalupa 2001-11-27 12:28:10 UTC
Target milestone -> 3.3.1.
Comment 2 Jesse Glick 2002-01-25 11:40:08 UTC
This would be very nice. I use this keystroke constantly in Emacs and
miss it in NetBeans.
Comment 3 Marek Grummich 2002-07-22 12:17:18 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 12:22:08 UTC
Set target milestone to TBD
Comment 5 bondolo 2003-04-08 17:55:46 UTC
To pose a contrary viewpoint, I want the TAB key to behave ONLY as a
tab key. The weird behaviour of TAB when I have a selection is really
inconsistent with the normal "replace selection" behaviour. 
Comment 6 Roman Strobl 2004-12-07 15:08:00 UTC
Changing subcomponent to formatting.
Comment 7 Roman Strobl 2005-04-20 16:01:43 UTC

*** This issue has been marked as a duplicate of 30147 ***