• Login
Community
  • Login

Notepad++ v8.3.2 release - Declare variables, not war

Scheduled Pinned Locked Moved Announcements
42 Posts 16 Posters 15.4k 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.
  • W
    WinterSilence @donho
    last edited by Mar 2, 2022, 8:50 PM

    @donho Where is RunDlg? Can you post new features with examples or description?

    P 1 Reply Last reply Mar 2, 2022, 9:02 PM Reply Quote 0
    • P
      PeterJones @WinterSilence
      last edited by Mar 2, 2022, 9:02 PM

      @wintersilence said in Notepad++ v8.3.2 release - Declare variables, not war:

      Where is RunDlg?

      That’s the Run menu’s Run action, which pops up the Run Dialog (which is presumably referenced as RunDlg in the code, as a reasonable variable naming scheme)

      $(CURRENT_LINESTR) is a new addition to the list of Run Dialog variables that are described in the npp-user-manual.org at Config Files: User Defined Commands – though as of today, the update to the usermanual that includes that new variable hasn’t had a chance to be published to the website yet. Often, we wait to trigger the release of the User Manual updates until the same time that Don triggers auto-update on a version (or there have been enough non-triggered releases that I ask Don to do a release of the User Manual anyway).

      So you would use the $(CURRENT_LINESTR) variable in similar ways to the other variables defined there, which allows you to pass some content into the command line of whatever command it is you are running.

      W 1 Reply Last reply Mar 2, 2022, 9:22 PM Reply Quote 3
      • W
        WinterSilence @PeterJones
        last edited by Mar 2, 2022, 9:22 PM

        @peterjones I’m not from Mars, just don’t know NPP dev’s slang :)

        this is “Run Dialog”?
        3ccb9ba4-1711-46af-a2cf-0d62474d61b9-изображение.png

        Variables like as $(CURRENT_LINESTR) must be adds as buttons into Run form.

        P 1 Reply Last reply Mar 2, 2022, 9:30 PM Reply Quote 0
        • P
          PeterJones @WinterSilence
          last edited by Mar 2, 2022, 9:30 PM

          @wintersilence ,

          I know you’re not from Mars; and I understand that you are doing your best to communicate in English when it’s not likely your preferred communication language.

          this is “Run Dialog”?

          Yes, the dialog you showed appears to be the Run Dialog Don and I referred to, based on the shape and number of buttons (I cannot read the text; sorry, I am not as multi-lingual as you are).

          Variables like as $(CURRENT_LINESTR) must be adds as buttons into Run form.

          There are too many of the variables to be put as buttons on the form. The user is just expected to type them into the entry form. For example, entering cmd /k echo "$(CURRENT_LINESTR)" and clicking Run will open a new command window, which will echo the contents of the current line of text

          c2fa71e4-1bc9-4e33-8740-9abac794c63b-image.png
          =>
          091ccdbd-47bf-489e-8986-02906a522659-image.png

          The User Manual shows example values for each of the variables. (For the example for $(CURRENT_LINESTR), you would currently have to follow my link to the github repo.)

          9a49672d-33bf-4073-8873-62de9b954e26-image.png

          W 2 Replies Last reply Mar 3, 2022, 12:28 AM Reply Quote 3
          • W
            WinterSilence @PeterJones
            last edited by Mar 3, 2022, 12:28 AM

            @peterjones offtop:

            I cannot read the text; sorry, I am not as multi-lingual as you are

            Android devices have app Google Lens to translate online by camera - must have app in Asia :)

            1 Reply Last reply Reply Quote 0
            • W
              WinterSilence @PeterJones
              last edited by WinterSilence Mar 3, 2022, 12:33 AM Mar 3, 2022, 12:33 AM

              @peterjones I’m know how it work - syntax same to nppExec plugin, but every time looking for vars ​​in online manual is not very conveniently

              1 Reply Last reply Reply Quote 0
              • G
                gtimbo
                last edited by gtimbo Mar 4, 2022, 4:38 AM Mar 4, 2022, 4:36 AM

                Notepad++ won’t open files when the path is very long. I have a file that’s at the end of a path that’s 259 characters long, and Notepad++ just cannot open the file. No error is flagged.

                I can’t give a full example, but it’s just a standard path that happens to be very deep (it’s a Java file within a deep package hierarchy, within an SDK, within a project, etc).

                Windows notepad.exe is able to open the file.

                I’m running an up-to-date version of Windows 10.

                Edited to add that the file is on a directly connected HDD, not a network drive, just in case that may make a difference.

                X 1 Reply Last reply Mar 4, 2022, 4:05 PM Reply Quote 0
                • X
                  xomx @gtimbo
                  last edited by Mar 4, 2022, 4:05 PM

                  @gtimbo

                  Yes, see e.g. the #10493.

                  Changing the MAX_PATH anachronism could be painful (maybe more than the current 2GB+ support implementation…).

                  G 1 Reply Last reply Mar 8, 2022, 10:32 PM Reply Quote 4
                  • S
                    Steffan Rhoads
                    last edited by Mar 5, 2022, 9:14 PM

                    I’ve used Notepad++ for decades.
                    When I learned how to use sessions – kludgy but the only effective means I’d found to manage work on multiple projects at a time using separate Notepad++ windows I was so pleased.

                    But, all good things come to an end. Now when I attempt to open a new session using a session file all the tabs from that saved session are opened in the exising session! Completely useless.

                    I thank you for how long it did work but unless it changes I have no idea what to use next and instead of working I’ll be back to evaluating other editers.

                    It has been rather frustrating that when a session is opened it isn’t ‘remembered’ so you can’t save a session unless you provide the correct session file to overwrite (not update).

                    As to your protest against Putin. Sure, war is evil but a push man to his limit & if he can he’ll kill you.

                    Study Putin’s decision making and it seems (not my research) that his decision making is influenced by a countryman, thinker, Alexandar Dugan. If the interpretation is correct the modern leftism is what Putin is fighting: american and indeed world politics and action are all coming out of Davos.

                    Hard to believe a communist/fascist is fighting leftism when ‘we’ should but that is how upside-down the world is now under ‘progressivism’.

                    P 1 Reply Last reply Mar 5, 2022, 9:25 PM Reply Quote 0
                    • P
                      PeterJones @Steffan Rhoads
                      last edited by PeterJones Mar 5, 2022, 9:28 PM Mar 5, 2022, 9:25 PM

                      @steffan-rhoads said in Notepad++ v8.3.2 release - Declare variables, not war:

                      Now when I attempt to open a new session using a session file all the tabs from that saved session are opened in the exising session! Completely useless.

                      That’s the way session files have always worked, as far back as I can remember. Please keep this “v8.3.2 release” topic reserved for things that changed between the most recent previous release (v8.3.1) and now (v8.3.2). Other than that, create a new topic in “Help Wanted” or “General Discussion” to get help on any other issue with Notepad++. Since I have confirmed that sessions worked as you described in v8.2.1, which is a couple versions old, that means that this issue is not a regression specific to v8.3.2, and you should create a new topic for discussing your desires regarding sessions.

                      1 Reply Last reply Reply Quote 1
                      • G
                        gtimbo @xomx
                        last edited by Mar 8, 2022, 10:32 PM

                        @xomx Ahh, sorry. For some reason I couldn’t find a link to GitHub, so posted here. Thanks for the info.

                        1 Reply Last reply Reply Quote 0
                        • Д
                          Давид Попов
                          last edited by Mar 11, 2022, 2:18 PM

                          There is a problem. When I try to make autocomplete with help “Ctrl+Enter”, it doesn’t always work. (I use my own syntax file, maybe this is the problem).

                          P 1 Reply Last reply Mar 11, 2022, 2:57 PM Reply Quote -1
                          • P
                            PeterJones @Давид Попов
                            last edited by Mar 11, 2022, 2:57 PM

                            @давид-попов

                            Ctrl-Enter starts the word-completion autocomplete. Historically, either TAB or ENTER would select the word and finish typing. In v8.2.1, Notepad++ added the feature to be able to turn those on and off:

                            In v8.2.1 and v8.3.0, when Notepad++ saw that you didn’t already have that setting in your config file, it would default it to TAB enabled and ENTER disabled. Starting in v8.3.1, the default went back to having both TAB and ENTER enabled – however, if you had installed v8.2.1 or v8.3.0, and Notepad++ had saved the setting with TAB enabled and ENTER disabled, upgrading to v8.3.1 or newer (like the v8.3.2 you imply you are using) will not overwrite that setting. Fortunately, all you have to do is click on the highlighted checkbox in Settings > Preferences > Auto-Completion, so it took me longer to type this, and probably took you longer to read this, then to fix it back to your old/expected behavior.

                            Official manual entry on Auto-Complete feature: https://npp-user-manual.org/docs/auto-completion/#completion-key

                            1 Reply Last reply Reply Quote 1
                            • donhoD donho unpinned this topic on Mar 14, 2022, 11:57 PM
                            • Vitalii DovganV
                              Vitalii Dovgan @Vitalii Dovgan
                              last edited by Apr 21, 2022, 10:32 AM

                              @vitalii-dovgan said in Notepad++ v8.3.2 release - Declare variables, not war:

                              Hmm, I tried to reproduce it today with different scenarios - and could not. Though it was stably reproducible yesterday.

                              Now I’m having a strong confidence that the issue was connected to improper invocation of Notepad++ from my side. Sorry for the previous misleading.

                              Anyway, as the result I’ve created a batch script that can be used to add a context menu item “Edit with Notepad++” for a single file and “Open in Notepad++” for a folder, using either a portable or an installed version of Notepad++. If interested, you can place this file directly into the Notepad++ folder and run it there.

                              The content of “npp_context_menu.cmd” :

                              @echo off
                              
                              echo Initialization...
                              set EXEDIR=%~dp0
                              set "EXE=%EXEDIR:\=\\%notepad++.exe"
                              set REGFILE=npp_context_menu.reg
                              
                              if exist "%REGFILE%" del "%REGFILE%"
                              
                              echo Writing "%REGFILE%"...
                              1>>"%REGFILE%" echo Windows Registry Editor Version 5.00
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell]
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell\notepadpp_edit_file]
                              1>>"%REGFILE%" echo @="Edit with &Notepad++"
                              1>>"%REGFILE%" echo "Icon"="\"%EXE%\",0"
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell\notepadpp_edit_file\command]
                              1>>"%REGFILE%" echo @="\"%EXE%\" -nosession \"%%1\""
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell]
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell\notepadpp_edit_folder]
                              1>>"%REGFILE%" echo @="Open in &Notepad++"
                              1>>"%REGFILE%" echo "Icon"="\"%EXE%\",0"
                              1>>"%REGFILE%" echo.
                              1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell\notepadpp_edit_folder\command]
                              1>>"%REGFILE%" echo @="\"%EXE%\" -multiInst -nosession -openFoldersAsWorkspace \"%%1\""
                              1>>"%REGFILE%" echo.
                              
                              REM Converting to UCS-2 LE (not mandatory)
                              if exist "%~dp0..\sfk\sfk.exe" set PATH=%PATH%;%~dp0..\sfk
                              sfk atow "%REGFILE%" -tofile "%REGFILE%"
                              
                              if not exist "%REGFILE%" goto ErrorNoRegFile
                              
                              echo Registering "%REGFILE%"...
                              start "Registering %REGFILE%" "%REGFILE%"
                              goto Done
                              
                              :ErrorNoRegFile
                              echo ERROR: "%REGFILE%" does not exist!
                              pause
                              goto Done
                              
                              :Done
                              
                              

                              This invokes Notepad++ using its -nosession command line argument to not affect the opened file history (this is especially useful when opening a folder).

                              1 Reply Last reply Reply Quote 2
                              • Alex PovolotskyA
                                Alex Povolotsky
                                last edited by Jun 22, 2022, 11:55 AM

                                This post is deleted!
                                1 Reply Last reply Reply Quote -5
                                • P PeterJones locked this topic on Jun 29, 2024, 3:31 PM
                                • First post
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors