2

我目前正在以 reStructuredText 格式编写文档。为了美化我使用了很多表格的东西,在这里你可能知道缩进变得非常重要——而且编辑起来很烦人。现在我需要将每行的第一个单词保留在原处,但我需要缩进第二列中的所有单词以对齐。

我可以使用alt+拖动来选择一个块,但是如何缩进呢?这将节省大量时间,因为不必去每一行TabSpace所有事情。

例子:

================================   ============
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

期望的结果:

================================   ============
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 
4

1 回答 1

1

您可以在要缩进的字符左侧的区域上进行矩形选择(alt+drag)。在所示示例中,您可以在三个“f”的左侧选择一个宽三个高的空格。(您也可以选择一个零字符宽乘三高的矩形。)然后键入空格字符,直到三行正确缩进。当您键入矩形选区时,每行都会输入相同的字符。

这不会对齐参差不齐的文本,但可以更快地对齐内容。当前许多左侧参差不齐的线条的另一个加速方法是逐个对齐相邻线条组,然后选择一个矩形区域并键入空格以对齐该区域。

(在 Notepad++6.3.2 中检查。)

于 2013-08-08T18:43:45.753 回答