我正在使用Vim来编写不是代码的文本,只是写自由形式.要做到这一点,我喜欢格式化选项包括w标志,有时还包括标志.
当一行以非空白字符结尾而不是第一个空白行(默认为Vim)时,w标志应该使它成为段落结尾.以下是帮助文档中的代码段:
w Trailing white space indicates a paragraph continues in the next line. A line that ends in a non-white character ends a paragraph.
在您键入时,a标志会自动重新格式化.例如,在下面带有文本的文档中,w和一个标记行重新格式化,因为我只键入“段落中的最后一行”而不是下面.
This it the first line of the paragraph. <cr> The text in it reformats properly as I type <cr> up to the last line of the paragraph,which is <cr> right after this line,that is,just below here: <cr> This is the last line of paragraph.<cr> This is the first line of second paragraph. <cr> Even though there is no blank line between <cr> it and first paragraph,any reformatting of <cr> the first paragraph ends at the last line <cr> of first paragraph.<cr> <cr> This the the first line after second paragraph<cr>
现在问我的问题:
使用a和w标志,当我输入第一段时,重新格式化正常工作,即第二段保持不变.但有时我想用vap选择当前段落.在我看来,使用w标志设置,这应该只选择第一段.但实际上在第一段中发出vap也会选择第二段,一直到< cr>的空白行,似乎忽略了w formatoptions标志.
这是预期的行为吗?我错过了什么吗?为什么vap不能只选择我所在的段落,该段落在第一行没有尾随空格?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。