在vim中,一个人如何从系统剪贴板而不是纯文本中粘贴样式文本?
例如,从web浏览器和粘贴在复制到字处理器通常导致样式的文本,包括基本格式(粗体)和链接被粘贴.一个人如何以相同的方式从浏览器复制,但将文本的原始HTML表示粘贴到vim?
临时添加html到clipboard选项应该有所帮助:
set clipboard^=html
put +
set clipboard-=html
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)html When the clipboard contains HTML, use this when pasting. When putting text on the clipboard, mark it as HTML. This works to copy rendered HTML from Firefox, paste it as raw HTML in Vim, select the HTML in Vim and paste it in a rich edit box in Firefox. You probably want to add this only temporarily, possibly use BufEnter autocommands. Only supported for GTK version 2 and later. Only available with the |+multi_byte| feature.