糖衣的记事本

Home Archives
2015-04-06
LinuxRecord

vim下将空格替换成换行符

从网络上复制下来的谷歌IP地址,被程序调前需将空格替换为换行符

从网络上搜到的方法是

:%s/ +/r/g

但vim提示无效的选项“+”,直接输入

:%s/ /r/g

替换成功

附:

%s :在整个文件范围查找替换

/ :分隔符

/r :换行符

/g :全局替换

Share Comments
Newer
echo(存疑):偶尔失灵的转义

Categories

  • ArduinoRecord
  • LinuxRecord
  • Paypal
  • http
  • linuxRecord
  • push

Tags

  • Gnome
  • apt
  • capabilities
  • dhcpd
  • docker
  • firefox
  • flash
  • hwclock
  • ifplugd
  • iptables
  • ipv6
  • linux
  • lvm
  • minicom
  • mysql
  • nat
  • openvpn
  • partition
  • phpmyadmin
  • python
  • qingcloud
  • qos
  • radvd
  • raspberry pi
  • search
  • shell
  • ssh
  • thunderbird
  • time
  • user-agent
  • vim
  • zdump
  • 阿里大鱼

Tag Cloud

Gnome apt capabilities dhcpd docker firefox flash hwclock ifplugd iptables ipv6 linux lvm minicom mysql nat openvpn partition phpmyadmin python qingcloud qos radvd raspberry pi search shell ssh thunderbird time user-agent vim zdump 阿里大鱼

Archives

  • March 2020
  • March 2019
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • December 2016
  • August 2016
  • May 2016
  • April 2016
  • March 2016
  • January 2016
  • December 2015
  • November 2015
  • September 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015

Recent Posts

  • 设置docker容器内的时区
  • 青云qingcloud的ipv6测试感想
  • 青云主机添加ipv6支持
  • 没有suid的ping
  • 分区修改记录
© 2020 糖衣黄连
Powered by Hexo
Home Archives