命令删除vim中的所有空白
我希望能够删除我的txt文件中使用vim的所有空白命令删除vim中的所有空白,vim,Vim,我希望能够删除我的txt文件中使用vim的所有空白 update reg04_rpt_animreg set birthdate = ' 2016-01-21 ' where animalid = ' TZN000192803889 '; update reg04_rpt_animreg set birthdate = ' 2015-07-05 ' where animalid = ' TZN000192803890 '; update r
update reg04_rpt_animreg set birthdate = ' 2016-01-21 ' where animalid = ' TZN000192803889 ';
update reg04_rpt_animreg set birthdate = ' 2015-07-05 ' where animalid = ' TZN000192803890 ';
update reg04_rpt_animreg set birthdate = ' 2011-12-12 ' where animalid = ' TZN000192803891 ';
update reg04_rpt_animreg set birthdate = ' 2013-05-05 ' where animalid = ' TZN000192803893 ';
update reg04_rpt_animreg set birthdate = ' 2013-04-02 ' where animalid = ' TZN000192803894 ';
update reg04_rpt_animreg set birthdate = ' 2015-05-16 ' where animalid = ' TZN000192803895 ';
我在vim中使用了以下命令,但尚未获得预期的输出
:g/^\s*$/d
我想您正在寻找
s
命令:g//d
删除与
匹配的整行
这将全局替换所有空格类型字符(
\s
)(g
)。我想您正在查找s
命令:g//d
删除与
匹配的整行
这将全局替换所有空格类型字符(
\s
)(g
)。如果您仅尝试修剪单引号内的空格,这应该可以:
:%s/= '\zs\s*\(\S*\)\s*'/\1'/g
如果您试图仅修剪单引号内的空格,则以下操作应有效:
:%s/= '\zs\s*\(\S*\)\s*'/\1'/g
如果你给我们看你想要的产品,那就容易多了。如果你给我们看你想要的产品,那就容易多了。