当我使用Vim的J命令时,大多数行连接一个空格填充。但在一段时间后,Vim总是使用两个空格。请参见以下示例:
This ends with a comma,but this ends with a period. Join with 'J' and what do you get?
对我来说,结果是:
This ends with a comma,but this ends with a period. Join with 'J' and what do you get?
一个空格后的逗号,两个后的周期。同样的故事,如果你用gq命令重新格式化段落。
:help joinspaces 'joinspaces' 'js' boolean (default on) global {not in Vi} Insert two spaces after a '.','?' and '!' with a join command. When 'cpoptions' includes the 'j' flag,only do this after a '.'. Otherwise only one space is inserted. NOTE: This option is set when 'compatible' is set.
所以,你会做一个
:set nojoinspaces
以获得你所渴望的。
或者,您可以使用切换设置
:set joinspaces!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。