使用记事本++ 如何制作一个数字递增的宏类型情况? [英] using Notepad++ how can i make a macro type situation in which a number increments?

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

问题描述

例如,我有大约 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 工具/插入行号"

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.

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

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