Community
    • Login

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

    Scheduled Pinned Locked Moved General Discussion
    9 Posts 3 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EkopalypseE
      Ekopalypse
      last edited by Ekopalypse

      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 
      
      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Ekopalypse
        last edited by Alan Kilborn

        @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?

        EkopalypseE 1 Reply Last reply Reply Quote 1
        • EkopalypseE
          Ekopalypse @Alan Kilborn
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • Michael VincentM
            Michael Vincent
            last edited by Michael Vincent

            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?

            EkopalypseE 1 Reply Last reply Reply Quote 5
            • EkopalypseE
              Ekopalypse @Michael Vincent
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • Michael VincentM
                Michael Vincent
                last edited by

                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!

                Alan KilbornA EkopalypseE 2 Replies Last reply Reply Quote 2
                • Alan KilbornA
                  Alan Kilborn @Michael Vincent
                  last edited by

                  @Michael-Vincent

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

                  1 Reply Last reply Reply Quote 2
                  • EkopalypseE
                    Ekopalypse @Michael Vincent
                    last edited by

                    @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?

                    1 Reply Last reply Reply Quote 0
                    • Michael VincentM
                      Michael Vincent
                      last edited by

                      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 :-(

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors