一看必会系列:VIM带#粘贴,导致格式错乱的问题。
Vim编缉时如有# 进行粘贴 #后面的就会被全部注释掉,且格式也会乱
如在下面文件进行粘贴时就会出现。。
global_defs {
notification_email {
# acassen@firewall.loc
# failover@firewall.loc
# sysadmin@firewall.loc
}
# notification_email_from Alexandre.Cassen@firewall.loc
# smtp_server 192.168.200.1
# smtp_connect_timeout 30
router_id mysql_DEVEL
}
下面这种情况。
global_defs {
notification_email {
# acassen@firewall.loc
# # failover@firewall.loc
# # sysadmin@firewall.loc
# }
# # notification_email_from Alexandre.Cassen@firewall.loc
# # smtp_server 192.168.200.1
# # smtp_connect_timeout 30
# router_id mysql_DEVEL
# }
#
——–解决
编缉模式下输入 :set paste
然后点插入,屏下脚 会显示
— INSERT (paste) —
然后再进行粘贴 就可以正常显示了
粘贴完后 记得用 : set nopaste 还原功能设置
暂时还木有人评论,坐等沙发!