Frage

I am currently writing documentation in reStructuredText format. To prettify things I am using a lot tables and here as you might know indentation becomes very important - and annoying to edit. Now I need to keep the first words of each line where they are, but I need to indent all words in the second column to line up.

I can use alt + drag to select a block, but how can I indent this? This would save a lot of time by not having to go to each line to Tab or Space everything.

Example:

================================   ============
xpath                              meaning
================================   ============
/div/a                             fetch all a-tags in all /div tags 
//a         fetch every a-tag 
./@href     fetch the href attribute of the current tag 
./text()    fetch the text held by the current tag

Desired result:

================================   ============
xpath                              meaning
================================   ============
/div/a                             fetch all a-tags in all /div tags 
//a                                fetch every a-tag 
./@href                            fetch the href attribute of the current tag 
./text()                           fetch the text held by the current tag 
War es hilfreich?

Lösung

You can do a rectangle selection (alt+drag) over the area to the left of the characters to be indented. In the example shown you could select one space wide by three high just left of the three 'f's. (You could also select a rectangle zero characters wide by three high.) Then type space characters until the three lines are correctly indented. When you type into a rectangular selection, the same character is entered into each line.

This does not align ragged text but it may make it quicker to align things. Another speed up with many lines currently having a ragged left is to align groups of adjacent lines one by one, then select a rectangular area and type space to align that.

(Checked in Notepad++6.3.2.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top