Using ALT+L+ shortcut to change the lexer/language



  • Does it happen only to me or is there something wrong in using the
    ALT+L+D or M to change the lexer?
    Every other combination opens the sub menus automatically, only these two don’t.
    And, yes, I’m using compact view (Settings->Preferences->Language->Make Language menu compact)
    Happens with 7.6.6 as well as with 7.7.0.

    Notepad++ v7.7   (64-bit)
    Build time : May 12 2019 - 01:26:14
    Path : D:\...\notepad++.exe
    Admin mode : OFF
    Local Conf mode : ON
    OS : Windows 7 (64-bit)
    Plugins : mimeTools.dll NppConverter.dll NppExec.dll PythonScript.dll 
    


  • @Ekopalypse

    Does it happen only to me

    Nope, not only you. Only tried 7.7.

    Have you toyed with it when running under the debugger?



  • @Alan-Kilborn

    Have you toyed with it when running under the debugger?

    äähhh - no, every time VS2017 updates it destroys my project and I have to
    configure it again and again …
    But good to know that I’m not the only one, then I guess will start another configuration
    of VS 2017 :-)

    Thank you for testing.



  • I doesn’t work because ampersands aren’t used in the code to make the letters underlined in the menu when pressing the Alt key. And for D and M with no other user defined languages, there’ll always be 2 D and M menu items:

    The D for expanding the D languages, and
    The D for “Define your language…” menu item

    The M for expanding the M languages, and
    The M for “Markdown (Default)” now provided with Notepad++ distro.

    Note for me, I have lots of other user defined languages like "Cisco IOS’, “Gnuplot”, “protobuf”, “VRML” as a consequence, the “C”, “G”, “P” and “V” menus don’t expand for me either.

    The simple fix is putting an ampersand before the letter in the .cpp or .rc file that defines the language menu and recompiling Notepad++. Or submit a pull request to do so?



  • @Michael-Vincent

    thank you very much - this makes totally sense and you saved me from setting up VS 2017 again :-). Now that I know why it is caused, I will ignore it :-D LOL

    Thank you.



  • I always do that with my plugins names and menu items. For example,

    Plugin Name:
    https://github.com/vinsworldcom/nppColumnTools/blob/master/PluginDefinition.h
    const TCHAR NPP_PLUGIN_NAME[] = TEXT("&Column Tools");

    Plugins menu items:
    https://github.com/vinsworldcom/nppColumnTools/blob/master/PluginDefinition.cpp

    setCommand( MENU_ENABLE,     TEXT( "&Enable all" ),enableAll, NULL, false );
    setCommand( MENU_SEPARATOR1, TEXT( "-SEPARATOR-" ),NULL,NULL, false );
    setCommand( MENU_HIGHLIGHT,  TEXT( "Column &highlight" ), highlight, NULL, false );
    setCommand( MENU_RULER,      TEXT( "&Ruler" ),ruler,NULL, false );
    

    And then when pressing Alt-P for the plugin menu, you’ll see “Column Tools” with the “C” underlined and pressing C will auto expand the “Column Tools” menu revealing the 4 menu items (3 with separator) and each will have the ampersand-prefixed letter underlined ready for a quick keyboard shortcut!



  • @Michael-Vincent

    But if other plugin authors that named their plugins starting with C did the same thing… Hmmm…



  • @Michael-Vincent

    Thanks for the tips.
    I have another question if you don’t mind.
    As stated earlier, I do have massive problems using VS 2017 community edition.
    By any chance, do you use it as well?
    Every time, and it is really every time, when VS installs an update I cannot longer compile npp or any other project I recently created. I get thousand of compiler errors.
    I need to create a new solution, add the project, do the necessary nuget updates - restart VS 2017 and then it is working again. Is this something you discovered as well?



  • I don’t use VS2017. Only to create a SLN / VCXPROJ file and maybe update the SDK. I generally use Notepad++ to develop and then an NppExec script that helps me compile with ‘msbuild’. I don’t do much development in C/C++, mainly scripting with Perl, Python and other text doc manipulation.

    Sorry no help :-(


Log in to reply