如何停止运行Vim宏 [英] How do I stop running Vim macro

查看:418
本文介绍了如何停止运行Vim宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我记录在宏寄存器中,太多的重复启动它.它需要的方式多的时间来完成每个宏.

I recorded a macro to a register and started it with too many repetitions. It takes way to much time to complete each macro.

如何取消/停止Vim在执行宏?有没有办法做它没有杀害编辑过程?

How do I cancel/stop Vim executing macro? Is there a way by doing it without killing editor process?

下面是我遵循以下步骤:

Here are the steps I followed:

  1. 录制宏寄存器1
  2. 我运行了1000次:1000@1
  3. 现在等待约6秒的时间完成每个宏.

推荐答案

C-C 工作

另外,你可以让它在错误打破. (我想这,是默认值).我有时暂时做

Also, you can let it break on error. (which, I think, is the default). I sometimes temporarily do

 :se nowrapscan

,以避免无限"循环在我的缓冲

to avoid "infinitely" looping over my buffer

此外,为了加快执行宏,使其沉默:

Also, to speed up macro execution, make it silent:

:silent! norm 1000@q

这篇关于如何停止运行Vim宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆