英文:
How to align the lines in notepad++
问题
<Parameter Name="FilePath" Value="/Test_01/path_01/vendor/dev/outbound"/>
<Parameter Name="FileName" Value="*.txt"/>
<SubParameter Name="HostIP" Value="192.165.10.5"/>
<SubParameter Name="UserId" Value="win-001"/>
英文:
Experts,
I have 1000's of lines captured from the xml file in below format in notepad++.
sample text
<Parameter Name="FilePath" Value="/Test_01/path_01/vendor/dev/outbound"/>
<Parameter Name="FileName" Value="*.txt"/>
<SubParameter Name="HostIP" Value="192.165.10.5"/>
<SubParameter Name="UserId" Value="win-001"/>
But I want to resize all the 1000's of lines in below format. Manually moving each line to the beginning of the line is tedious. Please assist me
<Parameter Name="FilePath" Value="/Test_01/path_01/vendor/dev/outbound"/>
<Parameter Name="FileName" Value="*.txt"/>
<SubParameter Name="HostIP" Value="192.165.10.5"/>
<SubParameter Name="UserId" Value="win-001"/>
答案1
得分: 2
在Notepad++中使用菜单 => 编辑 => 空白操作 => 修剪前导空格。
英文:
In Notepad++ use menu => Edit => Blank Operations => Trim Leading Space.
答案2
得分: 1
做一个查找/替换。将此输入到“查找内容”框中:
^\s+
而在“替换为”框中不输入任何内容。
查找一行开头的一个或多个空白字符,并替换为空,有效地删除它们。
英文:
Do a find/replace. enter this in the Find What box:
^\s+
And nothing in the Replace with box.
Find one or more whitespace characters at the beginning of the line and replace with null, effectively deleting them.
答案3
得分: 1
另一种选择是使用<kbd>Ctrl</kbd>+<kbd>A</kbd>来选择所有文本,然后按<kbd>Shift</kbd>+<kbd>Tab</kbd>几次(或按住)来减少缩进(包括空格和制表符)。
英文:
Another option is <kbd>Ctrl</kbd>+<kbd>A</kbd> to select all text and hit <kbd>Shift</kbd>+<kbd>Tab</kbd> several times (or hold) to reduce indent (both space and tab symbols).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论