having no file extension default to C++

Charles Cosse ccosse at gmail.com
Tue Mar 13 01:26:22 CET 2007


Hi Joerg,

that sounds perfect.  thank you both for your replies.

-charlie

On 3/12/07, Joerg Fischer <jf505 at gmx.de> wrote:
>
> Charles Cosse wrote:
>
> >>IIRC, NEdit scans the first 5 lines of a file looking for a regex
> >>match so anything common to all your files could be used.
> >
> >
> >Yes, i read that in the documentation somewhere, too, and that will
> >probably work for me; these are all cvs'd so i think there's got to
> >be a common header. I could check, but i'll just speculate. All the
> >standard C++ header files seem to have the substring "C++" in the
> >first line, so apparantly that's the convention.
>
> Another solution, if you know in advance that you open a file that
> should come into C++ mode, is to create a two line macro
>
> open_dialog()
> set_language_mode("C++")
>
> and bind it to Shift+Ctrl+o, cf. Help -> Macro/Shell Extensions ->
> Action Routines
>
> Cheers,
> Jörg
> --
> NEdit Discuss mailing list - Discuss at nedit.org
> http://www.nedit.org/mailman/listinfo/discuss
>


More information about the Discuss mailing list