views:

2089

answers:

6

In many text editors that are aimed at programmers, if the user has a selection that spans more than 1 line and presses the TAB key, those lines are indented by 1 TAB (or a number of spaces, depending on how the editor is configured).

However, this does not seem to be the default behavior of Notepad++. Is there a way I can do this in Notepad++, or is there a plugin that I can get to allow me to do this?

Edit: Upon additional testing, shift-tab correctly un-indents the lines as expected, but only a tab simply inserts a tab wherever the carat is. This is in version 5.4.5 Unicode

+1  A: 

I have Notepad++ 5.3.1 (UNICODE). I haven't done any magic and it works fine for me as described by you.

Maybe it depends on the (programming/markup/...) "Language"?

Notinlist
5.1.1 (Unicode) here and works too. Independent of the selected syntax highlighting language.
Joey
+1  A: 

It works fine for my v. 5.4.5 of Notepad++. I just select multiple lines and press tab.

If you want tab to be replaced by spaces than you need to go Settings->Preferences and select Edit Components tab. Next check Replace by spaces check box in Tab Setting section.

Vadim
+1  A: 

The problem was with the QuickText plugin. After removing it, indent worked as normal.

cdeszaq
+1  A: 

The problem with the new version of QuickText seems to be that it is set to react to the Tab key. Previously it was set to use Ctrl-Enter. If you change the key combination in the shortcut mapper then your Tab key should start working again, and QuickText should also work (with whatever new key you've assigned).

Mark Clements
+1  A: 

I would simply vote up Mark's suggestion above but I don't have enough rep yet. Change the QuickText shortcut to CTRL-Enter instead of Tab and everything will be golden.

Vernon
A: 

Just install the NppAutoIndent plug-in, select Plugins > NppAutoIndent > Ignore Language and then Plugins > NppAutoIndent > Smart Indent.

Anshi
Hi Anshi, welcome to Stack Overflow. Please note that writing in ALL CAPS is difficult to read and looks like shouting.
Helen