• Launch in Administrator mode not reopen edited file but original file

    8
    1 Votes
    8 Posts
    3k Views
    Sauro DellapittimaS

    Hello.
    Excuse me all for late (I’m absent in that period).

    Thanks, many thanks @Claudia-Frank, you are right.
    "Settings->Preferences->Backup->Enable session snapshot and periodic backup " wasn’t enabled where the problem exist.
    Activated this option, the problem is solved.

    Renew thanks.
    Cheers
    Sauro

  • How to completely turn off auto-complete.

    4
    1 Votes
    4 Posts
    1k Views
    Guillaume LaHayeG

    Although from time to time (especially after upgrades), I’ve noticed Auto-Completion gets re-enabled automatically. :(

  • URL to always download the current version of software

    3
    0 Votes
    3 Posts
    1k Views
    J TamJ
    The keeper of the repository could add a DOS JUNCTION (junction.exe) or a *nix symbolic link (ln -s) named LATEST_VERSION in the top level directory of the “repository/” host. Have you thought about writing code and submitting it? You could get the all-versions.html file, and parse it for the regexp: “Current Version”, then parse the line(s) the expression occurs on. This yields the canonical versionNumber. Now back-substitute this into the standard download URI and Robert is your aunt’s brother.
  • File-Open dialog not showing all files/folders

    Locked
    4
    1 Votes
    4 Posts
    2k Views
    PeterJonesP

    @Brian-Phillips,

    As it says on the File System Redirector page that ++@Scott-Sumner linked, “32-bit applications can access the native system directory by substituting %windir%\Sysnative”, so if you are using 32-bit Notepad++, and want to edit a file in the OS’s 64-bit system32\Drivers directory, you can browse to %windir%\Sysnative\Drivers or c:\windows\sysnative\Drivers (you can paste that in the File name box, or in the path-box at the top, if you’ve got that displayed), and it will be the files you expected.

  • Can I make NotePad++ auto-replace a string?

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Scott SumnerS

    @Henry-Vistbacka

    As @Mikhail-V suggests, you could do such a thing if you are willing to install and use the PythonScript plugin. Maybe there are other ways as well, but all would involve installing something extra, so why not the PS plugin? :-)

    Here’s some quick sample PS code, modify/experiment/enhance as you like:

    search_text = '--' replacement_text = 'en-dash' # <----- this is just placeholder, put what you want here def callback_sci_CHARADDED(args): if chr(args['ch']) == search_text[-1]: cp = editor.getCurrentPos() search_text_length = len(search_text) start_of_search_text_pos = cp - search_text_length if editor.getTextRange(start_of_search_text_pos, cp) == search_text: editor.beginUndoAction() editor.deleteRange(start_of_search_text_pos, search_text_length) editor.insertText(start_of_search_text_pos, replacement_text) editor.endUndoAction() end_of_search_text_pos = start_of_search_text_pos + len(replacement_text) editor.setCurrentPos(end_of_search_text_pos) editor.setSelection(end_of_search_text_pos, end_of_search_text_pos) editor.chooseCaretX() editor.callback(callback_sci_CHARADDED, [SCINTILLANOTIFICATION.CHARADDED])
  • Rename bulk xml tag with current value

    Locked
    1
    0 Votes
    1 Posts
    503 Views
    No one has replied
  • Issues with "Scintilla commands" keyboard shortcuts

    Locked
    8
    0 Votes
    8 Posts
    4k Views
    Scott SumnerS

    @Mikhail-V

    I think the issue with “Enter” binding should be reported if it is not yet been.

    Yes, sure, go ahead and report it if it isn’t already an issue.

    I assigned it to Alt+F and luckily it works without invoking the menu

    Okay, now that is odd…but nice for what you need at the moment!

    …maybe strange…and adds overhead…for me it feels totally ok.

    It is totally okay…any “overhead” is meaningless…plus you are ready when editor.lineDuplicate() doesn’t meet your needs in all cases…you already have a script file started…for your “enhancements”! :-D

  • Search/replace macro options change, easier way?

    9
    0 Votes
    9 Posts
    5k Views
    hoytprH

    Awesome. Thanks. Are you as lazy as the noob who just says “help”? Probably not.
    Good idea to put it in the startup.py.

  • Keyboard Shortcuts

    Locked
    3
    1 Votes
    3 Posts
    807 Views
    Carl ReynoldsC

    Can’t believe I hadn’t tried that - Exactly what I need.

    Thanks!

  • Error with report.asp

    Locked
    2
    0 Votes
    2 Posts
    473 Views
  • Can't get Aspell spell check to learn new words

    Locked
    2
    0 Votes
    2 Posts
    579 Views
    chcgC

    You may want to create a issue at https://github.com/Predelnik/DSpellCheck/issues.
    Could you please add some info about the used versions of N++, DSpellcheck plugin, Aspell version.

  • Notepad++ Minimal Version Source Code?

    Locked
    4
    0 Votes
    4 Posts
    1k Views
    Juha Kallio-KujalaJ

    @Scott-Sumner

    Thank you so much for your help. I thought the minimalist version has some parts of the source code stripped away and not compiled into the binaries, I should have investigated that more closely.

    Thank you again for you fast and clear response, have a great day.

  • Horizontal Scrollbar Enhancement.

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    SalviaSageS

    I found the answer to my question here.

    https://superuser.com/questions/1098202/reset-width-in-notepad

    Looks like we will never be getting this feature…

  • 1 Votes
    3 Posts
    1k Views
    Peter LobleyP

    That worked! Thankyou.

  • Notepad++ "Stops working..." when app exited ...

    Locked
    1
    0 Votes
    1 Posts
    536 Views
    No one has replied
  • automatic line numbering help.

    Locked
    5
    0 Votes
    5 Posts
    7k Views
    Mikhail VM

    Hi , I would recommend you to install the Pythonscript plugin. So you can do all kind of document processing.
    I had similar scripts for similar tasks - I’ve edited one so it will work for your case.
    So once you have the plugin installed, this script will do the replacement in the whole active document
    (assuming brackets are used only for numbers and do not appear in other context):

    def cursorinfo(): # get caret info pos = editor.getCurrentPos() # current caret position LN = editor.lineFromPosition(pos) # current line number # LP = editor.positionFromLine(C) # buffer position at current line start return pos, LN # replace text in brackets with a number def replace_num(S, num): LC = S.find( "[" ) if LC >= 0 : RC = S.find( "]" ) number = str(num) S_new = S[0:LC + 1] + number + S[RC:] return S_new return S # process all text def process(): textL = [] for i in range (0, total): s = editor.getLine(i) # get text in line s = replace_num(s, i+1) textL.append(s) text = "".join(textL) return text pos, LN = cursorinfo() total = editor.getLineCount() # get lines total editor.setText( process() ) editor.gotoPos(pos) # restore caret position
  • How to extract just "text" with notepad

    Locked
    3
    1 Votes
    3 Posts
    1k Views
    Unlyn321U

    Hi Scott,

    Thanks for answering this quickly!

    My example was a bit flawed I realise, but the whole document is several thousand lines long and with very distinct “beginning text”.

    It would definitely help, but that still require a lot, a whole lot of manipulation.
    I’ll try it though, maybe after a bit of cleaning my spelling software will be more useful.

    Thanks!

  • How to batch out lines of code with same code but different variables?

    6
    0 Votes
    6 Posts
    2k Views
    guy038G

    Hi, @shadowfire-omega and All,

    Hope you don’t mind my late reply ! So, given the 8 lines "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+", which end, each, with a word, after the = separator sign

    "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Appraise "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Bluff "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Concentration "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Test "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Shadowfire "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=Omega "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=OK "aAppraise|0|Appraise "+Appraise+"/"eval(+mAppraise+)" "+cAppraise+"=The End

    and the regex S/R :

    SEARCH (?-is)Appraise(?=.+=(.+))|=.+

    REPLACE ?1\1

    First, the (?-is) forces the regex search to be sensitive ( non-insensitive !) to the case and the dot . regex character to represents any single standard character and not an End of Line character

    Then it matches any of the two alternatives, giving priority to the first one

    The regex (?-is)Appraise(?=.+=(.+))

    The regex =.+

    If the first alternative is chosen, it, then, matches the Appraise string but only if the look-ahead feature is verified. That is to say if there is, further on, in the same line, a = sign, followed by some standard characters, which ends the current line. As this condition is, by construction, always true, the part after the = sign is, thus, stored as group 1

    As soon as the = location is reached, by the regex engine, no more = sign can be found, afterwards. So, the first alternative cannot be matched, anymore, in current line !

    But, now, the second alternative =.+ matches all the end of line, beginning with the = sign

    In replacement, ?1\1 is a conditional structure, which means :

    If group 1 exists, we replace the string Appraise with the contents of group 1

    If group 1 does not exist, we do not rewrite anything. So, the range of characters beginning with the = sign till the end of current line, is deleted

    Et voilà !

    Cheers

    guy038

  • 0 Votes
    10 Posts
    2k Views
    guy038G

    Hi, @terry-r and All,

    A very simplified version of my regex (?-s)^(.+ by ).+\[only as by (.+)\], could be :

    ^.+ by .+[only as by .+] ( BEWARE : This syntax is not functional, it’s just for explanations !)

    As the syntax .+* stands for the longest range of standard characters which can match the remaining part of the regex :

    Then, this regex searches, from beginning of line, for :

    Any non-null range of standard characters, followed with the string by surrounded by two space characters

    Then, followed with a second non-null range of standard characters, followed with the string [only as by, followed with a space

    And, finally, with a third non-null range of standard characters, followed with the ] symbol, ending the line

    Don’t be afraid to ask the community if you feel some difficulties, when elaborating some advanced regexes !

    On the other hand, you’ll get some regex documentation here

  • Quote/apostrophe macros insert garbage text

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    guy038G

    Hi @FriendOfFred, and All,

    I, personally, add your macro, which works correctly, on my configuration ! But I admit that I didn’t do intensive tests to determine when something is going wrong !

    I’ve replied to a similar question, in the post, below :

    https://notepad-plus-plus.org/community/topic/15909/replace-text-between-2-characters/2

    So, here is a regex S/R, which will normalize the normal quotes to their enhanced version !

    SEARCH (?-s)["“](.+?)["”]|['‘](.+?)['’]

    REPLACE (?1“\1”:‘\2’)

    Select the Regular expression search mode

    Tick the Wrap around option

    Click on the Replace All button

    Et voilà !

    So, given this initial text, below :

    "Test" "Test” “Test" “Test” 'Test' 'Test’ ‘Test' ‘Test’

    You should get the following text :

    “Test” “Test” “Test” “Test” ‘Test’ ‘Test’ ‘Test’ ‘Test’

    So, at any time, when you perform this S/R, you’re sure that, after replacement, you get the two syntaxes “Test” and ‘Test’, only !

    You could, even, record this S/R as a macro, if you prefer to !

    Cheers,

    guy038