我相信textmate有一个模式,如果你开始输入,你将在你选择的所有行上输入相同的内容.在emacs中有类似的东西吗?我猜是矩形可以帮助我,但我不确定如何...
nic*_*ier 52
您绝对需要尝试安装多个游标:
https://github.com/magnars/multiple-cursors.el
这是在橘子酱和梅尔帕,所以只是:
M-x package-install multiple-cursors
bos*_*kom 22
其中一个解决方案是使用CUA模式.激活cua模式M-x cua-mode,选择矩形开始:首先按下C-Enter然后用标准移动命令移动光标进行选择,现在按任何时候输入将光标循环通过矩形的角落,使您可以在选择前添加或附加文本.
paw*_*que 19
您可以使用以下命令(和键)来完成此任务:
以下是这些功能的完整说明:http: //www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html
Ham*_*ter 16
对于那些想要在更复杂的情况下执行此操作并希望在不安装新模块的情况下执行此操作的人,请继续阅读.(这可以在没有安装MarkMultiple的Emacs中使用,虽然我个人使用并喜欢MarkMultiple)
我最近不得不将SQL查询输出到文件,然后将其格式化为MYSQL INSERT查询.以下是Emacs如何让我的生活变得轻松......
文件看起来像:
1 I am a random text
2 I am not
3 G, you've gone mad
4 Click on this link
5 Transfer in progress (we've started the transfer process)
6 But transfer happend yesterday
7 No you are
8 Oh please! this is getting too much!
9 I love emacs
10 I cant be bothered with this any more
11 its time to raise the bar
12 show me how to expand my territory
Run Code Online (Sandbox Code Playgroud)
我想让它看起来像:
(1, ,'I am a random text'),
(2, ,'I am not'),
(3, ,'G, youve gone mad'),
(4, ,'Click on this link'),
(5, ,'Transfer in progress (weve started the transfer process)'),
(6, ,'But transfer happend yesterday'),
(7, ,'No you are'),
(8, ,'Oh please! this is getting too much!'),
(9, ,'I love emacs'),
(10, ,'I cant be bothered with this any more'),
(11, ,'its time to raise the bar'),
(12, ,'show me how to expand my territory'),
Run Code Online (Sandbox Code Playgroud)
C-x (开始录制宏[此时正在记录所有键输入,因此请仔细按照说明进行操作]C-a键转到该行的开头M-f前进一个单词,然后键入","C-n转到下一行,然后C-x )结束宏C-u 11 C-x e 重复宏n(在这种情况下为11)次找到了!到现在如果你没有失败,你会得到一些看起来像这样的东西:
(1, I am a random text
(2, I am not
(3, G, youve gone mad
(4, Click on this link
(5, Transfer in progress (weve started the transfer process)
(6, But transfer happend yesterday
(7, No you are
(8, Oh please! this is getting too much!
(9, I love emacs
(10, I cant be bothered with this any more
(11, its time to raise the bar
(12, show me how to expand my territory
Run Code Online (Sandbox Code Playgroud)
在这一点上,我将让你去弄清楚剩下的.但是,在我离开之前,我想提到有很多方法可以实现这种目的.这只是其中一种方式,它恰好是我最喜欢的方式.
希望你发现它有用;)
| 归档时间: |
|
| 查看次数: |
41264 次 |
| 最近记录: |