How to select multiple lines
Erez Amit
erez.amit at gmail.com
Tue Sep 8 10:56:59 CEST 2009
Hi,
There's a macro on the Niki site called Verilog Find Pair (
http://nedit.hackvalue.nl/niki/index.php/VerilogFindPair). It's called that
way because it was initially written with Verilog keywords in mind, other
then that it can be easily customized and used in any other language.
Currently the macro does the following:
You place the cursor on a supported keyword, press the macro's bind-key or
accelerator and the macro jumps-to and selects the corresponding keyword.
In Eric's case it would either jump from module to endmodule or the other
way around.
It should be easy enough to add a 'select' option that would select all text
between the keywords. I'm currently quite busy, but if you have the patience
Eric, I'll do it as soon as I can.
Regards,
Erez
On Tue, Sep 8, 2009 at 10:59 AM, Thomas Orgis <thomas-forum at orgis.org>wrote:
> Am Tue, 08 Sep 2009 09:14:07 +0200
> schrieb Eric Bouyoux <eric.bouyoux at insidefr.com>:
>
> > 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 - Discuss at nedit.org
> http://www.nedit.org/mailman/listinfo/discuss
>
>
More information about the Discuss
mailing list