如何在文本中应用\ n字符以自动换行

时间:2019-03-27 14:14:46

标签: notepad++

使用给定的文字,其中\ n已经存在。我希望np ++自动使用这些字符并以虚线显示文本,而不是显示\ n字符。 这可能吗?

文字示例:

'Failed to import test module: TestsDashboard\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsDashboard.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n', 'Failed to import test module: TestsRelatedItems\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsRelatedItems.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n', 'Failed to import test module: TestsReports\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsReports.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n'

1 个答案:

答案 0 :(得分:1)

您可以使用扩展搜索和替换来实现此目的(Ctrl-H键盘快捷键):

enter image description here

如果“自动”是指粘贴时立即发生,我认为Notepad ++不支持。您必须编写一个自定义插件。