简体   繁体   English

删除多余的vim和viminfo行

[英]Remove extra lines of vim and viminfo

I am making a cat with 2 files 我正在用2个文件制作一只猫

1.txt content: 1.txt内容:

hi

2.txt content: 2.txt内容:

everyone

cat 2.txt >> 1.txt 猫2.txt >> 1.txt

1.txt new content: 1.txt的新内容:

hi
# This viminfo file was generated by Vim 7.2.
# You may edit it if you're careful!

# Value of 'encoding' when this file was written
*encoding=utf-8
...
everyone

It adds a lot of info that I don't want. 它增加了很多我不想要的信息。

could you help me? 你可以帮帮我吗?

Regards. 问候。

Working on RHEL 6.4 64 在RHEL 6.4上工作64

In the final file, just do 在最终文件中,只需执行

:g/^#/d

g It is for Global g适用于全球

^# It will find all the lines starting with # ^#它将找到所有以#开头的行

d It is for delete d用于删除

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM