• Removing punctuation before a line

    13
    0 Votes
    13 Posts
    2k Views
    УменяМодем ОграниченныйТрафикУ

    Yes, everything worked out, thank you!
    The first time I didn’t understand anything… the second time I didn’t notice my mistake…
    And the third time you read that I understood everything! :)

  • "new 1" never goes away

    6
    0 Votes
    6 Posts
    631 Views
    Paul RoubekasP

    Don’t have permission to change or delete the file. I have reached out to someone who does to make the change. It may take a day or two.

    Thanks for the help. :-)

  • Delete unwanted characters

    2
    0 Votes
    2 Posts
    310 Views
    EkopalypseE

    @Zara-Arik

    First of all thanks for the examples.
    We can see that you have made an effort to explain your goals.
    Unfortunately, at least for me, the explanations are confusing, so I don’t really understand what you want to do.
    Obviously, like me, English is not your first language, so I would recommend that you use an Online Translator to help you.
    Please note, the better/precise the question in your mother tongue is set, the better the translation will be.

    To the questions:

    Use the find dialog, go to the Mark Tab and mark the hits, optionally set bookmarks for each line

    Probably a regex search for \(.+?\) could provide this.

    How do you know if a sentence begins or ends. For this you actually need an AI that was really programmed for it and even this one won’t work 100%

    and 5. I do not understand.

    Translated with www.DeepL.com/Translator (free version)

  • How to create a remove "Search Mode: Regular expression"

    20
    0 Votes
    20 Posts
    2k Views
    redorbroderR

    @PeterJones
    Thanks for your help and info.
    I’ll just leave the accounts as they are, don’t want to mess things up…
    This account will be the one I use from now on.

    Best regards,
    Red

  • Trying to completely remove notepad++

    4
    0 Votes
    4 Posts
    12k Views
    Metin BatM

    hi, first of all i had a similar problem and it took a long time to solve the problem. as a result, I solved the problem completely and the steps should be as follows; First, you should uninstall Notepad ++ from the program manager, then open the file manager and select the option to show hidden files, folders and drives again in the window with the options> options> folder. then say okay close the windows. Open this computer window and search by typing Notepad ++ in the search box. after doing all these, run the registry editor searching CTRL + S Regedit, close all open folders, click on the computer and open the search window with the combination of CTRL + F Search the name Notepad ++ and delete the found files. Use the find next option to find and delete all, then restart your computer. Download notepad ++ x86.exe and x64.exe, then install the first x86. disable run when finished setup. then install the x64 version without running anything. When installation is finished run and close notepad ++. then reload the x86 version and all settings will be reset.

  • Configuration files each project?

    3
    1 Votes
    3 Posts
    267 Views
    Christian BusseC

    @Alan-Kilborn said in Configuration files each project?:

    @Christian-Busse

    I suggest using the EditorConfig plugin.
    For background infos, see https://editorconfig.org/

    Great! Perfect for us!

  • [UDL] Labels highlight In Custom Batch Doesn't Work As Expected

    31
    1 Votes
    31 Posts
    3k Views
    EkopalypseE

    Now we can rest and go to bed :-D
    If there is anything about the script let us know here.

    Good night.

  • batch scripts now open in npp instead of running.

    4
    0 Votes
    4 Posts
    594 Views
    Vin dickatorV

    @PeterJones I thought, they wanted Batch to run instead of opening it in Notepad++ directly (like the default functionality); guess I mis-understood their motives…

  • Any way to create a shortcut to add prefix and suffix to a word?

    15
    0 Votes
    15 Posts
    4k Views
    Alan KilbornA

    Okay, here’s another (and probably last) try.
    Basically, if there’s no active selection and the caret isn’t touching a word when the script is run, it means you want to modify the current prefix/suffix setup.
    Otherwise, the current prefix/suffix is applied to the current selection/word.

    # -*- coding: utf-8 -*- from Npp import editor class T19459a(object): def __init__(self): self._prefix = '' self._suffix = '' def update_prefix_suffix_info(self): separator = '-' while True: user_input = notepad.prompt( 'Enter PREFIX{s}SUFFIX :\r\n(PREFIX or SUFFIX (not both) maybe be empty, but must still use {s})'.format(s=separator), '', '') if user_input == None: return # Cancel parms_list = user_input.strip().split(separator) if len(parms_list) == 2: (prefix, suffix) = parms_list if len(prefix) + len(suffix) == 0: continue break self._prefix = prefix self._suffix = suffix def run(self): already_ran_input_prompt_this_cycle = False if len(self._prefix + self._suffix) == 0: self.update_prefix_suffix_info() already_ran_input_prompt_this_cycle = True word_at_caret_or_selection = '' (sel_start, sel_end) = (editor.getSelectionStart(), editor.getSelectionEnd()) if editor.getSelections() == 1 and sel_start != sel_end: word_at_caret_or_selection = editor.getTextRange(sel_start, sel_end) else: start_of_word_pos = editor.wordStartPosition(editor.getCurrentPos(), True) end_of_word_pos = editor.wordEndPosition(start_of_word_pos, True) if start_of_word_pos != end_of_word_pos: word_at_caret_or_selection = editor.getTextRange(start_of_word_pos, end_of_word_pos) editor.setSelection(end_of_word_pos, start_of_word_pos) if len(word_at_caret_or_selection) == 0: if not already_ran_input_prompt_this_cycle: self.update_prefix_suffix_info() elif len(self._prefix + self._suffix) > 0: editor.beginUndoAction() editor.replaceSel(self._prefix + word_at_caret_or_selection + self._suffix) editor.endUndoAction() if __name__ == '__main__': try: t19459a except NameError: t19459a = T19459a() t19459a.run()
  • SecurePAD HELP

    2
    0 Votes
    2 Posts
    348 Views
    PeterJonesP

    For future readers who think we ignored this question, it’s because we tackled the problem in https://community.notepad-plus-plus.org/topic/19455/securepad-help, a nearly-identical posting from about a minute later in the Plugin Development category.

  • regex replace doesn't work

    4
    1 Votes
    4 Posts
    418 Views
    Alan KilbornA

    @Stefan-N said in regex replace doesn't work:

    By “leading assertions” you are talking about the “look ahead/behind” structure?

    Yes.

    When you are doing “step finds” (where you press Find Next to repeatedly jump to the next match), the buffer to be searched literally starts right where the caret is.
    There is no knowledge of what comes to the “left” of the caret.
    Thus, a positive look-behind assertion at that point will always fail – which is what you are seeing.
    A negative look-behind assertion will always succeed.
    Just a peculiarity of the N++ searching engine.
    Something to remember for the future!

  • Double Click in find results does not open and highlight

    11
    0 Votes
    11 Posts
    1k Views
    EkopalypseE

    I copied your macro, restarted Npp and did some tests and
    those worked for me. Sorry, not sure what breaks it on your side.

  • 0 Votes
    3 Posts
    1k Views
    Alan KilbornA

    @Perry-B

    It seems like this regex will match your text: (?s)^\h+?<vehicle>.*?</vehicle>\R

  • 0 Votes
    6 Posts
    643 Views
  • Easy way to mock up Position based Flat File

    12
    0 Votes
    12 Posts
    6k Views
    Sonali DixitS

    @Alan-Kilborn Thank you Alan, this looks lot easier to work with. but it seems like I need to update my Notepad++ I have older version.

    Hey by the way, I found one more link that might help, just sharing if any one else can use it. https://www.convertcsv.com/csv-to-flat-file.htm

  • Replace X number of lines after finding Y

    11
    0 Votes
    11 Posts
    2k Views
    guy038G

    Hello, @brian-krontz, @ekopalypse, @terry-r @alan-kilborn, @makwana-prahlad and All,

    To @makwana-prahlad :

    Why are you using such a complicated script, with some advanced options of sed ?

    To my mind, the one-line script, below, does the job nicely, too ;-))

    sed -n "/^\x0C/,+5d ; /(Continued)/d ; p" Input.txt > Output.txt

    Notes :

    First, sed searches, in the Input.txt file, for a range of lines :

    The first line of this range must contain the FF char, at beginning of current line, so the /^\x0C/ syntax

    Till the next 5 lines, that is to say, till the 6th empty line. Thus, the ,+5 syntax

    Then, the d command deletes this range of entire lines

    Secondly, sed searches if the next 7th line contains the (Continued) string, with that exact case, so the syntax /(Continued)/ , and, in that case, the d command, again, deletes this current line

    Finally, if none of these criteria can be verified, the p command simply rewrites the current line in the Output.txt file

    Indeed, not the same philosophy at usual N++ regexes, but rather easy to understand, too !

    Cheers,

    guy038

    P.S. :

    My sed script is not totally exact ! Indeed, if a line, located outside the header zone, contains the string (Continued), this line is wrongly deleted ! But, anyway, we’re on a Notepad++ forum, after all ;-))

  • RegEx: Anchor for beginning of file

    10
    0 Votes
    10 Posts
    10k Views
    guy038G

    Hi, All,

    Do you know how I could maintain some spacing between the three regexes :

    (?<!\n|\r|\f)^    ,    ^\A    ,    \A^

    Which are usually rewritten :

    (?<!\n|\r|\f)^ , ^\A , \A^

    in the legal code text, of my previous post ?

    Well, the trick is to use No Break Space character(s) ( \xA0 ), instead of the usual Space chars ( \x20 ) ;-))

    So, use the Alt + 160 input method, from the numeric keypad, to insert a No Break Space character, at current cursor location !

    Cheers,

    guy038

  • Compare text automation & result in excel format

    1
    0 Votes
    1 Posts
    446 Views
    No one has replied
  • Color syntax for Ruby breaks when %= is encountered

    10
    0 Votes
    10 Posts
    818 Views
    ice7512I

    @Ekopalypse Thanks

  • Replace all in all opened Documents (bug)

    3
    0 Votes
    3 Posts
    455 Views
    Roy BoothR

    I never considered that, but your right. Thanks :)