• How Do I Remove Highlighted CTRL F & LF From Each Line of Text?

    36
    0 Votes
    36 Posts
    5k Views
    PeterJonesP

    @Troglo37 said in How Do I Remove Highlighted CTRL F & LF From Each Line of Text?:

    If I install the new plugin, will it remove the arrow?

    No, it won’t. The + ▼ ✕ are not on the toolbar, they are on the menu bar. They are two different things.

    Will there be two arrows since the current one is in the right corner too? Or will the new plugin simply add the ¶ “Show All Characters” feature to the arrow pull-down?

    ??? I think you are confused. The CustomizeToolbar allows you to show or hide buttons on the existing toolbar, or to add new custom buttons to your toolbar.

    Here’s a screenshot of what mine looks like in the righthand side when I’ve got a narrow window, with Customize Toolbar active:

    47bd95d4-f083-41a6-a530-303ab4349c41-image.png

    The + ▼ ✕ are all still there. And on the toolbar, since there are more buttons than fit on screen, it uses a » to access any remaining ones.

    But none of that has anything to do with hiding the ¶ “Show All Characters” button. If you use Customize Toolbar to hide it, it will use everything else from your toolbar, except it just won’t show that one button.

  • Delete specific lines in file

    6
    0 Votes
    6 Posts
    592 Views
    Mark OlsonM

    @Mark-Olson said in Delete specific lines in file:

    FIND: [[012]]:

    Yeah, I’m aware that my regex was wrong.

    I intended to enter \\[[012]\\], but apparently even after the recent upgrades to the forum it still has the issues with escaped squarebraces.

    I had to test to see if the issue was still there, but didn’t have time to fix my post after it came out wrong.

  • Alternative method of UDL association that file suffix possible?

    6
    0 Votes
    6 Posts
    685 Views
    PeterJonesP

    I previously said,

    [I’ll] give it a try

    This is what I came up with:

    INSTALLATION

    Follow the instructions https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
    to install PythonScript Plugin and save this script as SelectUDLBasedOnShebang.py You will want to follow the “Starutp script” instructions in that FAQ as well, with the following two linesimport SelectUDLBasedOnShebang selectUDLBasedOnShebang = SelectUDLBasedOnShebang.SelectUDLBasedOnShebang()

    CONFIGURE:

    Go to the line with “CONFIG =” and edit the contents the extension should include the dot in the quotes the firstLineText is the text that should match the “shebang” line (the first line of your file) the NameOfUDL must match the name of your UDL exactly Save Run the script (Plugins > Python Script > Scripts > SelectUDLBasedOnShebang) or restart Notepad++

    SCRIPT: SelectUDLBasedOnShebang.py

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/24921/alternative-method-of-udl-association-that-file-suffix-possible If the extension is right, and the shebang line is right, set to a specific UDL INSTALLATION 1. Follow the instructions https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript to install PythonScript Plugin and save this script as `SelectUDLBasedOnShebang.py` 2. You will want to follow the "Starutp script" instructions in that FAQ as well, with the following two lines import SelectUDLBasedOnShebang selectUDLBasedOnShebang = SelectUDLBasedOnShebang.SelectUDLBasedOnShebang() CONFIGURE: Go to the line with "CONFIG =" and edit the contents - the extension should include the dot in the quotes - the firstLineText is the text that should match the "shebang" line (the first line of your file) - the NameOfUDL must match the name of your UDL exactly Save Run the script (Plugins > Python Script > Scripts > SelectUDLBasedOnShebang) From now on (including after restart), anytime you activate the buffer of a file ending with a known extension (one of the extensions in CONFIG), it will look at the first line, and if the first line exactly matches one of the firstLineText strings in the CONFIG table, then it will activate the UDL that has exactly the NameOfUdl """ from Npp import editor,notepad,console,NOTIFICATION import os class SelectUdlBasedOnShebang(object): CONFIG = { ".mscript" : { # the extension, including the . "#UDL!mscript1": "mscript1", # firstLineText : NameOfUDL "#UDL!mscript2": "mscript2", # firstLineText : NameOfUDL }, ".ext" : { # the extension, including the . "#UDL!ext1": "ext1", # firstLineText : NameOfUDL "#UDL!ext2": "ext2", # firstLineText : NameOfUDL }, } def __init__(self): '''Initialize the new instance''' current_version = notepad.getPluginVersion() if current_version < '2.0.0.0': notepad.messageBox('It is needed to run PythonScript version 2.0.0.0 or higher', 'Unsupported PythonScript verion: {}'.format(current_version)) return # setup callbacks notepad.callback(self.on_bufferactivated, [NOTIFICATION.BUFFERACTIVATED]) console.write("Registered on_bufferactivated callback for SelectUdlBasedOnShebang\n" ) # run the initial check self.check_for_udl(notepad.getCurrentBufferID()) def on_bufferactivated(self, args): ''' This callback called every time document is switched. Triggers the check if the document is of interest. Args: provided by notepad object; the args of interest: args['bufferID']: ID for the activated buffer Return: Nothing ''' self.check_for_udl(args['bufferID']) def check_for_udl(self, bufferID): ''' Check if the active buffer has a known extension for shebang processing If so, trigger the UDL-change Args: bufferID: ID for the buffer of interest Return: Nothing ''' filename = notepad.getBufferFilename(bufferID) (_,ext) = os.path.splitext(filename) if ext in self.CONFIG: self.check_shebang( self.CONFIG[ext] ) def check_shebang(self, shebangs): ''' Check if the active buffer has the right shebang If so, set teh UDL Args: shebangs: dict mapping shebang to corresponding UDL name Return: Nothing ''' firstLine = editor.getLine(0).rstrip(); if firstLine in shebangs: found = shebangs[firstLine] notepad.runMenuCommand('Language', found) if __name__ == '__main__': selectUdlBasedOnShebang = SelectUdlBasedOnShebang()

    If I do any more development on this, updated versions can be found at https://github.com/pryrt/nppStuff/blob/main/pythonScripts/nppCommunity/24xxx/24921_SelectUDLBasedOnShebang.py

  • Can't confirm E-mail for this Community

    2
    1 Votes
    2 Posts
    207 Views
    Terry RT

    @tfnab
    There is FAQ post about this here.

    Terry

  • How to run a find function with multiple data points

    3
    0 Votes
    3 Posts
    282 Views
    VerbobossV

    PeterJones thank you

  • Latest Update deleted NppCrypt plugin

    2
    0 Votes
    2 Posts
    415 Views
    PeterJonesP

    @Terry-TeeEss-Syndergaard ,

    My assumption is you were using an older version of NppCrypt. When Notepad++ updated, it was no longer compatible with that old version, but would allow you to install the new NppCrypt.

    Unfortunately, as stated in the FAQ by the NppCrypt author, there was one point where the NppCrypt author changed the algorithm (between 1.0.1.5 and 1.0.1.6), which made files encrypted under the old version no longer work with the new version.

    The FAQ suggested putting the old DLL in the right folder, then unencrypting, then re-installing the most recent NppCrypt and re-encrypt the files. However, if the old version of NppCrypt is no longer compatible with Notepad++, you will want to change the sequence slightly:

    download an older portable Notepad++ – it would have to be one before the 1.0.1.6 version of nppCrypt was released (Mar 2019), so I suggest v7.6.3, which I just confirmed will properly install NppCrypt 1.0.1.5 from Plugins Admin. Unencrypt your file(s) with the portable Notepad++ v7.6.3 with NppCrypt 1.0.1.5 Open the unencrypted file(s) with your recent Notepad++ with NppCrypt 1.0.1.6, and encrypt using the new algorithm If you’ve done this for all your encrypted files, you shouldn’t need the portable copy of Notepad++ anymore
  • How to dock Search results window?

    4
    0 Votes
    4 Posts
    5k Views
    AntonA

    Wow, thanks!
    I’m so stupid! Double click works perfect.
    I didn’t guessed it and suffered from this floating panel all last week.
    I was looking for some option in settings to get all back but double click is much better.

  • Version 8.5.7 doesn't recognize some files with html ext

    2
    0 Votes
    2 Posts
    184 Views
    PeterJonesP

    @Edward-Mcdaid said in Version 8.5.7 doesn't recognize some files with html ext:

    New files

    Have you tried saving the file, so that it knows what kind of file it is?

    If you want all new files to start as HTML, you can set that in Preferences > New Documents , otherwise you have to manually tell Notepad++ what file type it is, either by saving or by using the Language menu

    Actually, now I see that your title mentions .HTML extension… so check the Style Configurator for HTML: if it doesn’t list the four-lettee extension, you might have to add it to your user extensions. (I thought it was there by default, but maybe I’ve misremembered, or something got messed up in your installation)

  • Search Result font size/zoom level

    2
    0 Votes
    2 Posts
    335 Views
    Alan KilbornA

    @tordenflesk said in Search Result font size/zoom level:

    recent update of np++

    It’s traditional when making a complaint to cite the version you are currently running, as well as the version you were last running when it worked properly (if you can remember that, of course).

    search results text is blurred

    I have never seen such blurriness in only certain windows of the program. Just a wild thought here, but maybe experiment with the Direct Write setting. Probably won’t have any effect, but it is about the only thing that comes to mind for me.

    Anyway to set the default font size/zoom level?

    Not specifically and independently for Search results. The zoom level goes back to zero when Notepad++ is exited and restarted. The font size after a restart is the same as the font size for the editing window (at its zoom level 0). Side note: The zoom level for the main editing window IS retained from run to run of Notepad++.

  • xml lost after choosing user language

    2
    0 Votes
    2 Posts
    175 Views
    Terry RT

    @yehuda-levi said in xml lost after choosing user language:

    how to keep it as XML when choosing user language ?

    Notepad++ doesn’t (as far as I know) allow a combination of 2 languages to be selected at the one time, that would be sort of contradictory.

    But I believe a plugin called EnhanceAnyLexer here is where you should be looking. You install it from the Plugins/Plugins Admin menu option. So you would leave XML as the language and use the EnhanceAnyLexer plugin to supplement XML with the additional key words that form your custom language.

    My 2cents worth
    Terry

  • More than one Commen Line type in UDLs?

    3
    0 Votes
    3 Posts
    302 Views
    Sam MarroccoS

    Thank you, Peter.
    Your suggestion does exactly what I needed. Thank you.

  • WIndows 11 Plugins Admin Install Button Disabled

    3
    0 Votes
    3 Posts
    751 Views
    Ben SwansonB

    I appreciate your response and shamefully admit I overlooked the checkboxes. Thank you, Coises , that’s all it was. Plugins are installing juuuuust fine now.

    Hopefully this post doesn’t give false hope to someone seeking help for legitimate Windows 11 issues!

  • 0 Votes
    3 Posts
    326 Views
    Paolo LinxP

    @ Alan-Kilborn

    Wow! I missed your post…
    Thank you so much!

  • Keep custom settings during silent uninstall

    2
    0 Votes
    2 Posts
    323 Views
    Michel GaumontM

    Uninstalling the app was not the better solution in this case.

    I had to make sure NP++ was not running while transitioning to PatchMyPC.

    Afterwards, I had to delete whatever’s left of Chocolatey.

    I’d still be interested to know if there’s a silent option for keeping local profiles ^^

  • Replace random values with 0

    3
    0 Votes
    3 Posts
    266 Views
    Raoul EmilR

    @ Coises You are amazing,thank you very much.

  • Merge 2 Ascii Files in one

    10
    0 Votes
    10 Posts
    1k Views
    Mark OlsonM

    A proposal to clarify posts like this, so that people don’t waste time solving the wrong problem:

    use the word concatenate to refer to the process of taking a bunch of things and adding them one-after-the-other. use the word merge to refer to the process of taking a bunch of things and putting them together so that they overlap.

    For example, the link Doğancan posted above goes to a thread where I made a tool to merge files (examples in that thread).

    What everyone has been discussing above appears concatenation and should be labeled as such.

  • URL to XML Structure

    3
    0 Votes
    3 Posts
    540 Views
    L

    Thanks PeterJones, it worked flawlessly.

    Now I also understand the principle, so I can easily adapt it. You just have to have seen once :-)

    Thanks!

  • XML pretty print not working

    2
    0 Votes
    2 Posts
    1k Views
    gerdb42G

    @Hao Please note the following hints to formatting in this forum. There you can find how to mark text to be inserted literally and thus avoiding to get it mangled by the forum software.

    The CR LF is most likely shown because you have activated the option to show special characters which are normally invisible. Just hit the Pilcrow Symbol (“¶”) in the toolbar to disable.

    In the XMLTools Menu disable the Option “Enable auto Validation” and reload the file. That should prevent the other lines form appearing.

    Your version of Notepad++ is pretty outdated. Maybe you should ask your Admin about possibilities to update.

  • Find and replace across multiple rows

    3
    0 Votes
    3 Posts
    311 Views
    Ricardo GonzalezR

    That worked like a charm. Saved me hours worth of work. Thanks so much, I REALLY appreciate it.

  • Using Notepad++ on hosting

    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    @Саяд-Махмудов said in Using Notepad++ on hosting:

    Hello everyone! Does anybody know how to use notepad++ on hosting using the ssh protocol,

    The plugin NppFTP has the ability to make FTP or FTPS or SFTP (the last of which uses the SSH protocol for doing file transfers), to allow you to edit remote files in Notepad++.

    in order to edit all files on the server at once without downloading them to computer?

    Technically, that won’t happen; in order to be able to use an app on your local machine (ie, Notepad++) to edit a file on a remote machine (at the other end of the SSH/SFTP link), the bytes for the file must come over the network to be at least temporarily on your local machine; the NppFTP plugin will keep a local cache of the remote files, which is technically what is being edited, but every time you save in Notepad++, the NppFTP plugin sends the data back to the remote machine, via SFTP.