更改所选文本行的长度 sublime text 3?
Change the length of selected text lines sublime text 3?
有没有办法将选定的长文本拆分成多个较短的行?
例如:来自这个
French President Emmanuel Macron said France will not accept text that does not mention the historic Paris accord.
"If we don't talk about the Paris agreement and if we don't get an agreement on it among the 20 members in the room, we are no longer capable of defending our climate change goals and France will not be part of this," he said on Wednesday.
France was one of the main drivers behind the Paris accord and the French parliament is now debating an energy bill that targets net zero greenhouse gas emissions by 2050.
"Negotiations on the topic of climate will be especially difficult this time," a German government official said.
像这样
French President Emmanuel Macron said France will not accept text that does not
mention the historic Paris accord.
"If we don't talk about the Paris agreement and if we don't get an agreement on
it among the 20 members in the room, we are no longer capable of defending our
climate change goals and France will not be part of this," he said on
Wednesday.
France was one of the main drivers behind the Paris accord and the French
parliament is now debating an energy bill that targets net zero greenhouse gas
emissions by 2050.
"Negotiations on the topic of climate will be especially difficult this time,"
a German government official said.
有两种方法可以完成类似的操作,具体取决于您是要保留文本并能够阅读长行,还是要对文件进行物理修改。
软包装
如果您只是想查看文本但在物理上保持不变,那么您需要的是自动换行。您可以切换 View > Word Wrap
的状态以打开和关闭换行,View > Word Wrap Column
中的选项指定换行发生的位置。 Automatic
选择 window 的边缘,或者您可以为数据指定一个特定的列。
这是Soft Wrapping
;你会注意到 gutter 中的行与实际行不对应 1:1 因为有一个物理行但是有几个逻辑行(这里的 wrap 设置设置为 Automatic
):
自动换行状态由默认首选项中的word_wrap
设置控制;确定默认的换行状态是什么。从菜单更改换行只会更改您当前正在编辑的文件的换行,因此如果您想永久更改状态,您应该更改该设置。
此外,wrap_width
设置控制软包装发生的位置,0
(默认值)是 window 的宽度(即 Automatic
设置在菜单中)。 View > Word Wrap Column
下的菜单项将此设置的值更改为特定值,但您可以在首选项中设置任何您喜欢的值。
硬包装
如果您想对文本进行物理修改,则需要 Edit > Wrap
菜单中的选项。在这里,您可以 select 将文本全部换行,或者将光标放在一个段落内,只换行一个段落。
您可以选择在特定列或当前标尺处换行,您可以在 View > Ruler
中指定。
当以这种方式完成时,文件的内容被物理修改(这里我选择了在第 70 列换行的选项,并从上面关闭了软换行):
标尺(或多个标尺;您可以有多个)的位置由 rulers
设置控制,默认情况下为空。上面的菜单项将当前文件中的标尺设置为菜单项中显示的值,但您可以将 rulers
设置为任何您想要的设置。如上所述,设置的默认值在您的首选项文件中,菜单项仅更改当前文件的状态,因此您需要修改首选项以设置永久值。
在特定列处换行的菜单项使用带有指定 width
参数的 wrap_lines
命令也是毫无价值的,因此如果需要,您可以制作一个自定义键绑定,将换行任何你想要的位置。
有没有办法将选定的长文本拆分成多个较短的行?
例如:来自这个
French President Emmanuel Macron said France will not accept text that does not mention the historic Paris accord.
"If we don't talk about the Paris agreement and if we don't get an agreement on it among the 20 members in the room, we are no longer capable of defending our climate change goals and France will not be part of this," he said on Wednesday.
France was one of the main drivers behind the Paris accord and the French parliament is now debating an energy bill that targets net zero greenhouse gas emissions by 2050.
"Negotiations on the topic of climate will be especially difficult this time," a German government official said.
像这样
French President Emmanuel Macron said France will not accept text that does not
mention the historic Paris accord.
"If we don't talk about the Paris agreement and if we don't get an agreement on
it among the 20 members in the room, we are no longer capable of defending our
climate change goals and France will not be part of this," he said on
Wednesday.
France was one of the main drivers behind the Paris accord and the French
parliament is now debating an energy bill that targets net zero greenhouse gas
emissions by 2050.
"Negotiations on the topic of climate will be especially difficult this time,"
a German government official said.
有两种方法可以完成类似的操作,具体取决于您是要保留文本并能够阅读长行,还是要对文件进行物理修改。
软包装
如果您只是想查看文本但在物理上保持不变,那么您需要的是自动换行。您可以切换 View > Word Wrap
的状态以打开和关闭换行,View > Word Wrap Column
中的选项指定换行发生的位置。 Automatic
选择 window 的边缘,或者您可以为数据指定一个特定的列。
这是Soft Wrapping
;你会注意到 gutter 中的行与实际行不对应 1:1 因为有一个物理行但是有几个逻辑行(这里的 wrap 设置设置为 Automatic
):
自动换行状态由默认首选项中的word_wrap
设置控制;确定默认的换行状态是什么。从菜单更改换行只会更改您当前正在编辑的文件的换行,因此如果您想永久更改状态,您应该更改该设置。
此外,wrap_width
设置控制软包装发生的位置,0
(默认值)是 window 的宽度(即 Automatic
设置在菜单中)。 View > Word Wrap Column
下的菜单项将此设置的值更改为特定值,但您可以在首选项中设置任何您喜欢的值。
硬包装
如果您想对文本进行物理修改,则需要 Edit > Wrap
菜单中的选项。在这里,您可以 select 将文本全部换行,或者将光标放在一个段落内,只换行一个段落。
您可以选择在特定列或当前标尺处换行,您可以在 View > Ruler
中指定。
当以这种方式完成时,文件的内容被物理修改(这里我选择了在第 70 列换行的选项,并从上面关闭了软换行):
标尺(或多个标尺;您可以有多个)的位置由 rulers
设置控制,默认情况下为空。上面的菜单项将当前文件中的标尺设置为菜单项中显示的值,但您可以将 rulers
设置为任何您想要的设置。如上所述,设置的默认值在您的首选项文件中,菜单项仅更改当前文件的状态,因此您需要修改首选项以设置永久值。
在特定列处换行的菜单项使用带有指定 width
参数的 wrap_lines
命令也是毫无价值的,因此如果需要,您可以制作一个自定义键绑定,将换行任何你想要的位置。