having no file extension default to C++
Joerg Fischer
jf505 at gmx.de
Tue Mar 13 00:57:40 CET 2007
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
More information about the Discuss
mailing list