vi-vim-粘贴内容时,保留原文件内容格式

在vi/vim普通模式下执行:set paste命令,再按 i 插入就会保留原文件格式

  • :set paste 打开粘贴命令
  • :set nopaste 关闭命令
  • :h paste 帮助