使用Notepad ++,我如何使数字递增的宏类型情况? [英] using Notepad++ how can i make a macro type situation in which a number increments?

查看:332
本文介绍了使用Notepad ++,我如何使数字递增的宏类型情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我大约有500行.在每行的开头,我想添加一个数字.因此,在第1行中,我想要"1)",然后在第2行中,我想要"2)"

for example i have about 500 lines. in the beginning of each line i want to add a number. so in line 1 i would want "1)" and then line 2 i would want "2)"

我知道我可以在n ++中做一个宏,但是它不是增量的.有什么可行的方法吗?

i know i can do a macro in n++, but it wouldn't be incremental. is there any possible way to do this?

推荐答案

Notepad ++宏仅播放键盘操作.他们无能为力.

Notepad++ Macros only playback keyboard actions. They can't do anything dynamic.

但是有一个内置的(?)插件可以为您完成此操作.

However there is a built-in(?) plugin that can do this for you.

突出显示所有代码,然后选择"TextFX/TextFX Tools/插入行号"

Highlight all the code, then choose "TextFX / TextFX Tools / Insert Line Numbers"

要注意的一件事是它是文件中的绝对行号.您不能在第10行开始编号,而只能说第03行.

One thing to be aware of is that it is the absolute line number within the file. You can't start numbering on line 10 and make it say line 03 or something like that.

这篇关于使用Notepad ++,我如何使数字递增的宏类型情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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