emacs快速删除

本文介绍了如何在Emacs编辑器中实现类似于Vim编辑器的快速删除功能,包括向前和向后移动到特定字符并进行删除的操作方法。
<?xml version="1.0" encoding="utf-8"?> emacs快速删除

emacs快速删除

1 哪儿来的

这个想法我从vim中借过来的,以前在用vi操作的时候常常会用到 dt df 来删除一大段文字,还会用到 ~di"~ 之类的快速命令。

可在emacs里面却没有这样的命令,今天在stackoverflow里面找到一个人跟我同样的问题。

Location: http://stackoverflow.com/questions/9860321/emacs-move-to-a-certain-character-forwards-and-backwards

2 问: Emacs: move to a certain(某一,已确定的) character, forwards and backwards

In vim, I can use f to move the cursor forwards to a certain character and F to do this backwards. How to do it in Emacs? I know you can use C-z or M-z to delete until a certain character, and you can also first delete then paste to achieve a motion. But 1) is there a better way to do this, only movement, without delete? and 2) how to do this backwards?

Forward incremental search is C-s , and reverse incremental search is C-r .

3 答: Responding to comment:

To delete from the current position backwards to a specific character, you can use

C-<space> to mark the current position, then C-r <char> <RET> to locate the search character, and C-w to up vote 2 down delete between current position and mark.

To get more help on doing things in emacs, you should look at the tutorial. Typing C-h t will open the tutorial in a new buffer.

To delete, use zap-to-char or activate the mark by pressing C-spc before jumping, then C-w.

Date: 2013-01-21 Mon

Author: liweilijie

Org version 7.9.2 with Emacs version 23

Validate XHTML 1.0

转载于:https://www.cnblogs.com/liweilijie/archive/2013/01/21/2870119.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值