I have 100 lines, I want to add 001 at the beginning of the first, 002 at the second, 003 at the third, and so on. In emacs I can replace ^ with ,(format "%03d" (1+ #))
Is it possible to do something like this in geany? I've read the documentation on regular expressions but I couldn't find a solution.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
you could get that using this plugin[1], checking "Padding: Zero" (if you select at least 100 lines).
Cheers, Johannes
[1] http://plugins.geany.org/geanyinsertnum.html
On Sun 26 Oct 2014 14:30:22 CET, Andrea Paganini ap_9@outlook.com wrote:
I have 100 lines, I want to add 001 at the beginning of the first, 002 at the second, 003 at the third, and so on. In emacs I can replace ^ with ,(format "%03d" (1+ #))
Is it possible to do something like this in geany? I've read the documentation on regular expressions but I couldn't find a solution.
_______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Thank'you very much! It works well... I didn't think of looking through plugins
Cheers, Andrea
Date: Sun, 26 Oct 2014 15:01:56 +0100 From: johannes.lange@rwth-aachen.de To: users@lists.geany.org Subject: Re: [Geany-Users] Geany regexp: sequential numbering
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
you could get that using this plugin[1], checking "Padding: Zero" (if you select at least 100 lines).
Cheers, Johannes
[1] http://plugins.geany.org/geanyinsertnum.html
On Sun 26 Oct 2014 14:30:22 CET, Andrea Paganini ap_9@outlook.com wrote:
I have 100 lines, I want to add 001 at the beginning of the first, 002 at the second, 003 at the third, and so on. In emacs I can replace ^ with ,(format "%03d" (1+ #))
Is it possible to do something like this in geany? I've read the documentation on regular expressions but I couldn't find a solution.
_______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAEBAgAGBQJUTP7UAAoJEJrD1L/VaPRxWTIP/jzeTX7096WXF5WwIlZ5KoAw wayjFu/3Hq8Ohj4ws8hE5l9cs8FMr6jXr00uPFaKz5XKfT3ww/HwSEPSlNk2MQTu CBYjxKLw+UBgyAskbZJwk3G3iHyH0rRyJxJf1UAbEtNXaSdlijYvnT4h90fsw5tV RAJseZCREE/3FpN6XNMCIU1NPCpdQgWV8OYKVmukC04qq2edBLXuA9FYxCBOkRDQ ++l5Kdm4Gf0WyIfwD04SrBSeBG9TIzlBeD9jrPicYrHzLwuc2l4hDlzatYKQ7VKJ awasl4amgEnfNOvuwqgYl8UOgiQJXJ7+bry5LDUILj/xQ2Pqq3Mp/FtZ9tNfbyRE aTA1qQjeoNoDD2tHzXWN0IKjlKusocxZ+5zPZ2Gbx9SHtiy7464UcfPMtEv0ak/r 2SzUhrp5FWdL0U12WkvdJGU6VOdRZpgy29p9k1geDBJtwsisZXUkBd9cusdXJpO3 RAk7yXZMvTUtwJrpbFu7w5k88ha8HbTlcqCk3rfkca442DE1j8bh23VrRYjqVr+H KhlC7AD+0AIX5bP1Cng/1tLOfs8ho8BnzMCKCk4X8QWXMyLFP2d+2/rSTws01ZE3 c8jf3H97vFede13udobpb/xnroSjG96GVkG/ATGM0KHs1T2lsKacJk34xyI2Ib9z 2p55V58+6vMG6u+Y8szS =gPM0 -----END PGP SIGNATURE----- _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Le 26/10/2014 14:30, Andrea Paganini a écrit :
I have 100 lines, I want to add 001 at the beginning of the first, 002 at the second, 003 at the third, and so on. In emacs I can replace ^ with ,(format "%03d" (1+ #))
Is it possible to do something like this in geany? I've read the documentation on regular expressions but I couldn't find a solution.
Not that I know of, no. We use standard PCRE regular expressions that don't provide such features.
I think Emacs has a batch mode? Try using Edit>Format>Send Selection To and set up a command to format selected text through it, or some other program that works with more advanced pattern matching.
Hope this helps.
James
Thank'you everybody,
Actually the plugin Insertnumber suggested by Johannes Lange does the job very well, so I'm fully satifsfied now.
Thank'you again,
Andrea
Date: Sun, 26 Oct 2014 16:20:12 +0000 From: jmb8710@gmail.com To: users@lists.geany.org Subject: Re: [Geany-Users] Geany regexp: sequential numbering
I think Emacs has a batch mode? Try using Edit>Format>Send Selection To and set up a command to format selected text through it, or some other program that works with more advanced pattern matching.
Hope this helps.
James
-- James Brierley http://slippy.dynu.net/~james/
Depression is the name given to an illness caused by one having a realistic view of the human race. _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users