• Find in files returns 0 results

    Locked Dec 31, 2015, 11:26 AM
    0 Votes
    2 Posts
    3k Views

    Hello Aled-Powell,

    one of the error sources could be permission problems. You use a non-priviledged account
    where as files stored in the directory belong to administrator only. Or someone set the permission
    that no one is allowed to read the files at all.
    Another possible issue could be that the directory isn’t really a directory but a hard/soft link or even worse
    a network link to an unknown formatted source. You think I’m jokeing, I went through all of this.
    And one of the most common problem when using npp and windows 10 together is/was that
    there are problems when starting npp in adminstrative mode. Now that I wrote this last sentence I
    reckon’ that I should have started with it. So please double check shortcut properties->compatibility.

    Cheers
    Claudia

  • 0 Votes
    9 Posts
    8k Views

    So let’s summarize.
    The script worked before but not as expected
    because the original version matched only whole words
    and not if the searched word is part of another word.

    To change this I changed

    editor.research('\\b{0}\\b'.format(selected_text), lambda m: matches.append(m.span(0)))

    to

    editor.research('{0}'.format(selected_text), lambda m: matches.append(m.span(0)))

    then I thought maybe there can be also a difference in notation
    therefore I included regex module

    import re

    and added the ignorecase flag to the research function.

    editor.research('{0}'.format(selected_text), lambda m: matches.append(m.span(0)),re.IGNORECASE)

    Which broke not only your uploaded code, which by the way is working for me,
    but also the python script plugin??

    This is weird. There is nothing fancy here. re module is part of the standard python lib.

    OK, please comment the import re line

    # import re

    and change the editor.research … to

    editor.research('{0}'.format(selected_text), lambda m: matches.append(m.span(0)))

    and do another test.

    You do not need to do anything in the python script console, just open it, it serves as an
    error output window if something within the python code is wrong.
    For example if you add the re.IGNORECASE flag but you do not import re module first
    the error would be shown in the console window as soon as you double click on a word.

    Traceback (most recent call last): File "...\Notepad++\plugins\Config\PythonScript\scripts\Highlight.py", line 42, in sci_callback_DOUBLECLICK colorize() File "...\Notepad++\plugins\Config\PythonScript\scripts\Highlight.py", line 29, in colorize editor.research('{0}'.format(selected_text), lambda m: matches.append(m.span(0)),re.IGNORECASE) NameError: global name 're' is not defined

    May I ask you which OS, npp and python script plugin version you use?

    Cheers
    Claudia

  • How to remark out a line

    Locked Dec 31, 2015, 4:49 PM
    0 Votes
    3 Posts
    3k Views

    Thanks for the rapid reply. :)

    This is a game .ini file for Fallout 4.

    I followed your recommendation and will try it in a few minutes.

    Thank you very much.

    Well it seems to work. Game runs with no problem with the item remarked out.

    So unless I run into problems I will leave it that way.

    Thanks again.

  • Insert / Move XML Rows

    Locked Dec 29, 2015, 4:01 PM
    0 Votes
    8 Posts
    7k Views

    Hello Juan,

    could it be that the xml is layout more like

    <App action='A' id='1378'> <BaseVehicle id='128520'/> <SubModel id='3043'/> <EngineBase id='2133'/> <Qty>1</Qty> <PartType id='6708'/> <Part>G600096</Part> </App> <App action='A' id='1379'> <BaseVehicle id='128520'/> <SubModel id='296'/> <EngineBase id='2133'/> <Qty>1</Qty> <PartType id='6708'/> <Part>G600096</Part> <Note>W/O TOC ATTACHED<Note/> </App>

    if so, I didn’t take care that Note node may start with spaces in front.
    The find regex needs to be changed like

    (.*Qty>1<\/Qty>)\R(.*)\R(.*)\R(.*Note>.*\/>)

    Cheers
    Claudia
    P.S. I tried to modify guy038’s regex but didn’t get it done :-(
    but I learned and replace \r\n with \R :-)

  • Save as .txt default

    Dec 2, 2015, 9:45 AM
    0 Votes
    5 Posts
    6k Views

    Hello,
    did a quick check, opened a new document, chose save as
    and got .txt as the default extension. So looks ok for me.
    Win7 x64 npp6.8.8

    Cheers
    Claudia

  • find and replace help

    Locked Dec 29, 2015, 3:27 PM
    0 Votes
    5 Posts
    8k Views

    Hi Claudia,

    No, It’s not related to the complexity of the regex ! It’s just that the step-by-step replace doesn’t work at all, as soon as the search regex contains, at least, one \K form :-(( Though I don’t know exactly why !?

    Consider the subject string below :

    abc abcdef abcdefghi abcdefghidefjkl

    With the simple S/R SEARCH abc\Kdef and REPLACE 123, if I click on the Replace All button, we get the right text :

    abc abc123 abc123ghi abc123ghidefjkl

    Note that the second string def has not been changed, because it wasn’t just after an abc string. That’s correct !

    On the contrary, if I click, several times on the Replace button, nothing has changed !!!

    Cheers,

    guy038

    P.S.:

    I’ve just realized that the bug exists too, if we use a look-behind, instead of the \K form !

    So, the S/R SEARCH (?<=abc)def and REPLACE 123 does the job, if you click on the Replace All button, ONLY !

    Remember that, due to the look-behind feature, this regex tries to match a def string, only if preceded by the string abc

  • Can NPP have tripple views?

    Locked Dec 29, 2015, 4:27 AM
    0 Votes
    2 Posts
    3k Views

    3 views is not possible. Only 2.

  • 0 Votes
    2 Posts
    2k Views

    Hello Greg,

    may I ask you which version of npp you are using as this issue
    should have been solved already. Some 5.8… version if I remember correctly.
    In the meantime I edited hosts file on a windows7 x64 pc with npp 6.8.7
    and do not have the problem you described.

    Cheers
    Claudia

  • not finding ftp plugin

    Locked Dec 27, 2015, 1:25 AM
    0 Votes
    8 Posts
    12k Views

    I’m afraid, no - it was requested as a feature but developer never implemented it.
    The only shortcuts you can defined are

    to show NppFTP window to focus NppFTP window to call about NppFTP

    Not very helpful if you want one for uploading.

    Cheers
    Claudia

  • 0 Votes
    3 Posts
    3k Views

    THANK YOU SO MUCH THAT WORKED GREAT!

  • Unwanted number pop-u

    Locked Dec 28, 2015, 3:17 PM
    0 Votes
    3 Posts
    2k Views
  • 0 Votes
    2 Posts
    11k Views

    Hello Lisa-Cagle,

    it could be that you either

    have no write permission to the destination folder (did you use administrator account for installation?) or that there is already a file with the same name which has read-only flag set, so it can’t be overwritten.
    (if the file already exists, right click ->properties)
    Which OS do you use?

    Cheers
    Claudia

  • Selected tag background styling

    Nov 2, 2015, 10:54 AM
    0 Votes
    10 Posts
    6k Views

    @webdevpug,

    should I try and ask developers of the NPP to look into issue?

    I would give it a try, why not? There are already a lot of the scintilla
    styling parameters defined why not asking to provide the rest of it as well.
    There might be a reason not to do so but I guess asking can’t hurt.

    Cheers
    Claudia

  • 0 Votes
    4 Posts
    4k Views

    Claudia: Your solution works perfectly. Thanks so much!

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    8 Posts
    16k Views

    Hello Angelo,

    In a prompt DOS window, your can know what is the current encoding : just type the command chcp and valid with the enter key. You probably use the codepage 850 ( OEM Multilingual Latin 1 ). Refer to the link, below :

    https://msdn.microsoft.com/en-us/goglobal/cc305160

    Of course, once your .bat file, opened in Notepad++, the accentuated characters, with code-point > \x{7f}, are wrongly displayed, because, Notepad++, use the default Microsoft ANSI codepage ( probably Windows-1252, as on my French configuration ! ). Refer to the link, below :

    https://msdn.microsoft.com/en-us/goglobal/cc305145

    You can, also, see that list, with the menu option Edit - Character Panel

    Remember that this ANSI code-page is the default codepage used, for all your NON Unicode programs, of your configuration.

    Therefore, the solution to get a well displayed .bat file, both, in N++ and with edit.com, in a DOS window, is to encode your file with the OEM 850 encoding with the menu option Encoding - Character sets - Western European - OEM 850
    ( if, of course, the chcp DOS command returned the number 850 )

    You may, also, convert, afterwards, this .bat file to the UTF-8 encoding, by using the menu option Encoding - Convert to UTF-8. However, this time, after opening it, with edit, in a DOS prompt window, it will be wrongly displayed too !

    Best Regards,

    guy038

    P.S. :

    BTW, I didn’t know the /U option of the DOS command cmd. Thanks for that tip :-))

  • 1 Votes
    9 Posts
    5k Views

    Hmm you wrote it like I would come from different planet.
    I’m not sure I described it well in my engrish :)

    But I’m sure it’s worth to build in. As I said for me as beginner, is pain in somewhere to make Atom work. It’s difficult to set it and know all available packages for my needs. It’s like every new package for every issue you want inside. It’s a lot of work to set it and also I’m not sure how overwrite basic-core key bindings and how manage conflicts of newcome key bindings coming with newly installed packages. But no more about Atom. My hero is Notepad++, I really want to stuck with it, but if me - a beginner has problems with it, I’m surprised others don’t.
    I just hope, this project won’t end like Sublime text ended or Lighttable too. Please developers listen to audience needs. Don’t let it die because of obsolete and not changing forward.

    Thanks

  • 0 Votes
    7 Posts
    5k Views

    Thanks for help =)

  • 0 Votes
    2 Posts
    2k Views

    Hello jgjake2,

    you can’t blame npp for this rather your mouse properties settings.
    Check Pointer Options -> Snap to
    I assume this has been enabled(checked).

    Cheers
    Claudia

  • 0 Votes
    5 Posts
    4k Views

    You guys got my point although I didn’t make it clear enough. It’s a pity that npp could not get an environmental variable.
    Just let you know my demand better and my solution in R:

    library(R.utils)
    user <- System$getUsername()
    directory <- paste(“C:\\Users\\”, user, “\\workspace”, sep=“”)
    setwd(directory)

    With the above code, I could set the working directory correctly regardless of which computer I use, so it’s easy for me to switch different computers.

    I’m just a beginner of Python, however, I will learn your script @Claudia-Frank .
    Thank you all!@XP1 @Claudia-Frank