Re: How to select multiple lines
Thomas Orgis <[email protected]>
| Newsgroups | gmane.editors.nedit.user |
|---|---|
| Message-ID | <20090908095929.066c3b8e@sunscreen> |
Am Tue, 08 Sep 2009 09:14:07 +0200 schrieb Eric Bouyoux <eric.bouyoux-Umy9UjvE/gtWk0Htik3J/[email protected]>: > Hi, > > The title is not very explicit. Let's have an example. > My file contains : > module toto ; > ... (1000 lines of code) > endmodule > > I want to remove all lines between "module toto" and "endmodule". > One possibility is to select all lines between the 2 keywords and to > remove them. But how can I do this automaticaly ? Interesting point. I am not sure how many other Fortran programmers are here... there is an equivalent task in C-style languages, the operation to got to a machting bracket/brace/parentheses: function bla() { (100 lines of code) } You can place the cursor on the first {, then press Ctrl+M and the cursor jumps to the closing brace. The interesting part for you is that you can hold the shift key while doing that, marking the whole block as result. OK, that marks the braces, too, and they will be removed when you hit "delete", but they are easily replaced... The whole functionality to jump to the end of a block would be nice for Wirth/Fortran-style languages (with begin / end, if / end if, do / end do, ...) when it worked with words instead of only braces / parentheses. I'm quite confident that one could add this functionality as macro (is the current Ctrl+M already a macro, perhaps?), but I am not friends of the nedit macro language. I just keep getting told that I can implement every feature I want with it (visual indent of soft-broken lines, for example). Alrighty then, Thomas. PS: I have to nit-pick: A 1000-line module would always reside in its own file in my code... so removing all the inner module code would involve pressing shift, then ctrl+end to mark everything up to the end... going a line back (to keep "end module"), hit delete. -- NEdit Discuss mailing list - [email protected] http://www.nedit.org/mailman/listinfo/discuss
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqmDuEACgkQm0xSvNRG1SRnHACbBZZ8ljLAUygdPYYqraQFOAaP 0PoAniqm5j26mYDWfwJYZ947cpr4CYV1 =Ku9C -----END PGP SIGNATURE-----