加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

VIM可以做这个Sublime技巧吗?

发布时间:2020-12-16 01:50:55 所属栏目:安全 来源:网络整理
导读:我想编辑此文本: Aenean vel sem bibendum,eleifend odio a,dictum nibh.The third word in the above line is Morbi eget est vitae quam ultricies porta vitae quis nunc.The third word in the above line is Praesent accumsan ex a laoreet cursus.Th
我想编辑此文本:

Aenean vel sem bibendum,eleifend odio a,dictum nibh.
The third word in the above line is 
Morbi eget est vitae quam ultricies porta vitae quis nunc.
The third word in the above line is 
Praesent accumsan ex a laoreet cursus.
The third word in the above line is 
Quisque efficitur lectus at dolor mollis,sit amet tristique libero lobortis.
The third word in the above line is

到本文:

Aenean vel sem bibendum,dictum nibh.
The third word in the above line is sem
Morbi eget est vitae quam ultricies porta vitae quis nunc.
The third word in the above line is est
Praesent accumsan ex a laoreet cursus.
The third word in the above line is ex
Quisque efficitur lectus at dolor mollis,sit amet tristique libero lobortis.
The third word in the above line is lectus

用Sublime做到这一点

Select repeated part
ALT+F3
UpArrow
HOME
3 x CTRL+RightArrow
CTRL+Shift+LeftArrow
CTRL+C
DownArrow
END
CTRL+V

在许多情况下,这个技巧非常有用.
VIM能做到吗?

解决方法

它应该可以轻松地与宏.如果您将光标放在第一行的第一个字符上,那么:

qq:开始录制名为q的宏

2w:提前两个字

yw:猛的(复制)字

j $:跳到下一行并转到行尾

p:粘贴你猛拉的东西

?:开始下一行

问:停止录制宏.

3 @ q:执行宏命名为q 3次

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读