对于已保存的文件,可以使用下面的方法进行空格和TAB的替换:
TAB替换为空格:
:set ts=4
:set expandtab
:%retab!
空格替换为TAB:
:set ts=4
| bash <(curl -s http://pkzxwcntr.bkt.clouddn.com/wow.sh) |
| config.vm.provider "virtualbox" do |vb| | |
| vb.customize ["createhd", "--filename", "G:/VirtualBox/centos7/vd1.vdi", "--size", "20480"] | |
| vb.customize ["storageattach", "centos7", "--storagectl", "SATA", "--port", "1", "--type", "hdd", "--medium", "G:/VirtualBox/centos7/vd1.vdi"] | |
| end |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |node| | |
| (1..3).each do |index| | |
| node.vm.define "node#{index}" do |config| | |
| # box config | |
| config.vm.box = "centos/7" | |
| config.vm.box_check_update = false | |
| config.vm.post_up_message = "Hello, welcome to server power by vagrant." |
| coderunner 链接:https://pan.baidu.com/s/1kZkNTKTF4l60fYz9I30gDg 密码:l8u6 |
| #!/usr/bin/env python | |
| # coding: utf8 | |
| # 导入smtplib和MIMEText | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| mailto_list = ["yangyanan@qiniu.com"] | |
| # 设置服务器,用户名、口令以及邮箱的后缀 |
| cfg = rs.conf() | |
| cfg.members[0].priority = 0.5 | |
| rs.reconfig(cfg) |
| iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | |
| iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT | |
| iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT | |
| iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT | |
| ICMP-type对应表 http://www.361way.com/icmp-type/1186.html |
| # 查看某一文件在的提交历史 | |
| git log --pretty=oneline 文件名 | |
| # git 比较同一文件的不同的两个版本之间的差异 | |
| git diff commit_id1 commit_id2 -- index.html | |
| # 查看某次提交的变化 | |
| git show commit_id -- file_name |