• Sort order of tab bar

    Locked
    6
    0 Votes
    6 Posts
    8k Views
    Claudia FrankC
    If you start npp with the remember current session … setting (Settings->Preferences->Backup) but this doesn’t work if you open npp from the commandline with a wildcard flag. Or you could save this session and start npp from the command line with the -openSession filename parameter. Cheers Claudia
  • Find in Files - search only files with no extension

    6
    0 Votes
    6 Posts
    7k Views
    Scott SumnerS
    @John-Bowman If you don’t mind the idea of creating some new commands (one-time-only) and executing TWO additional steps (every search), here is a workaround for Notepad++'s current inability to search in extensionless files. Your workflow will be slightly modified: Step 1: Run command “Rename *. to *.NOEXT” (defined below) on the Run menu to rename extensionless files to have extension “.NOEXT” (while you are editing any top-level file in the search tree that has a real extension) Step 2: Run your desired search; add *.NOEXT to list of filespecs to search Step 3: Run command “Rename *.NOEXT to *.” (defined below) on the Run menu to rename .NOEXT files back to being extensionless (again, while you are editing any top-level file in the search tree that has a real extension) Details of command “Rename *. to *.NOEXT”: One-time setup: In Notepad++'s Run menu, choose Run… Paste the following in “The Program to Run” box: cmd /c cd $(CURRENT_DIRECTORY) & For /R %G in (*.) do REN "%G" "%~nG.NOEXT" Press the Save button and name it something meaningful like “Rename *. to *.NOEXT” After accepting the name via the OK button in the “Shortcut” window, press the Cancel button in the “Run…” window (yes, seems like the wrong thing to do). Details of command “Rename *.NOEXT to *.”: One-time setup: In Notepad++'s Run menu, choose Run… Paste the following in “The Program to Run” box: cmd /c cd $(CURRENT_DIRECTORY) & For /R %G in (*.NOEXT) do REN "%G" "%~nG." Press the Save button and name it something meaningful like “Rename *.NOEXT to *.” After accepting the name via the OK button in the “Shortcut” window, press the Cancel button in the “Run…” window. Thanks to this website for some helpful info on renaming files: http://ss64.com/nt/ren.html
  • Unattended Installation (Auto Update Disabled)

    5
    0 Votes
    5 Posts
    17k Views
    Stephan MaucherS
    @fralbert Yeah! Would never have tested that. Thanks 1k!
  • Add the chapter title on each line with REG-EXP

    5
    0 Votes
    5 Posts
    3k Views
    guy038G
    Hello, Trucide Polère and Claudia, Trucide, I also found two S/R to achieve what you would like to but, compared to the Claudia’s solution, the second S/R needs to be run, once only :-))) So, just click on the Replace All button, once for each S/R ! My solution works : Whatever the location of the word “Chapter”, in current line Whatever the number value, of the word “Chapter” ( Numeric sort not needed ) Whatever the case of the word “Chapter” If blank line(s) is(are) inserted between two chapters If blank line(s) is(are) inserted between two lines of a chapter Remark : These regexes need an extra character, which must NOT exist, yet, in your file. I chose the # symbol but any other symbol may be used. Just escape it if this symbol is a special regex character ! So, given the example text, below, with 3 blank lines after “line 10” : Chapter 156 line 1 line 2 line 3 line 4 line 5 Chapter 2 line 5 line 6 This is a test : chapter 37 line 7 line 8 line 9 line 10 The first regex S/R, below, adds a line, beginning with a # symbol and followed by the number of the current chapter, just before the line, containing the next word chapter, whatever its case OR before the very end of the file SEARCH (?i)Chapter\h+(\d+)(?s).+?(?=(?-s).*Chapter|\z) REPLACE $0#\1\r\n So it gives the changed text, below : Chapter 156 line 1 line 2 line 3 line 4 line 5 #156 Chapter 2 line 5 line 6 #2 This is a test : chapter 37 line 7 line 8 line 9 line 10 #37 The second regex S/R, below : search for a complete line, beginning with a # symbol, and deletes it search for a non-empty line, which does not contain the word Chapter, whatever its case but it’s followed, further on, by the nearest # symbol with its number, stored as group 1 then adds this number, followed by a dash, in front of each line, during replacement SEARCH (?i-s)^#.+\R|(?!.*Chapter)^.+(?=(?s).+?#(\d+)) REPLACE ?1\1-$0 So, we obtain the final text, below : Chapter 156 156-line 1 156- line 2 156-line 3 156- line 4 156-line 5 Chapter 2 2-line 5 2-line 6 This is a test : chapter 37 37-line 7 37- line 8 37- line 9 37-line 10 Best Regards, guy038 Note : as usual : The modifier (?-s) means that further dot character ( . ) stands for any single standard character, except for any End of Line character The modifier (?s) means that further dot character ( . ) stands for any single character, included End of Line character The modifier (?i) means that the regex search is performed in an insensitive way The modifier (?s) means that the regex search is performed in a sensitive way
  • Undo file associations

    3
    0 Votes
    3 Posts
    3k Views
    GordyPankG
    I don’t know if you have figured this out by yourself yet, but it appears that Notepad ++ breaks several file associations (at least on my systems) that I have had to manually fix - .bat, .cmd, .ini, .inf, nfo. and .vbs. The easiest way to fix this is via the ASSOC command from the (Administrator) command prompt. The best way to check which associations need to be looked at is to run ‘assoc’ and copy-and-paste the results into (ironically) Notepad ++ and look at which ones are associated with NPP. You can get the syntax by typing ‘assoc /?’ at a prompt. The proper associations for the ones listed are: .bat=batfile; .cmd=cmdfile; .inf=inffile; .ini=inifile; .nfo=MSInfoFile .vbs=VBSFile It also seems to grab .bash file extensions too, but unless you have the new Bash shell on Windows 10 installed this won’t matter. Hope this helps!
  • Compile C# from NPP

    Locked
    7
    0 Votes
    7 Posts
    7k Views
    Jawz FerocityJ
    @Scott-Sumner said: Perhaps the best way to explain it so that it is understood is that instead of doing cmd /k csc.exe “$(C:\Users\user1\Documents\MyFiles\sample.cs)” You should do cmd /k csc.exe “C:\Users\user1\Documents\MyFiles\sample.cs” Make sure that works, then change it to how you really should do it, and that is, have your file – C:\Users\user1\Documents\MyFiles\sample.cs – active in an editor tab, and then invoke exactly this: cmd /k csc.exe “$(FULL_CURRENT_PATH)” TY guys I’m up and running.
  • 0 Votes
    2 Posts
    3k Views
    Claudia FrankC
    @Bryce-Gessell outlining is one of those terms which do have different meanings and/or assumptions what is expected, so please forgive me if my tip isn’t useful - what about using a regular expression and search for all in current document? Cheers Claudia
  • i want to keep only unique lines

    duplicates unique lines
    3
    0 Votes
    3 Posts
    19k Views
    Hà NguyễnH
    Hi Guy038 , " the regexes : SEARCH = (?-s)^(.+\R)\1+ , REPLACE = EMPTY " i do that step ,but nothing happen ,why so ,dear
  • Installation problem

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    Angel BlooderA
    Doesn’t matter, i downloaded the dll file manually, is working now.
  • Notepad++ Plugin Disable?

    4
    0 Votes
    4 Posts
    5k Views
    Claudia FrankC
    @crogersts Thanks for replying, I tried the switch and no it is the same unfortunately. Are you sure? This switch disables the plugin manager - you still have the import menu but you cannot load the plugins. Cheers Claudia
  • Hello-Help with regular expressions

    regex
    3
    0 Votes
    3 Posts
    2k Views
    guy038G
    Hello, Antonio, If you are sure that the last colon, of each line of your file, is the exact location which separates the two parts, of each line, to be reversed , an other formulation could be : SEARCH : (?-s)^(.+):(.+) REPLACE : \2: \1 ( with a space between the colon : and the back-reference \1) Notes : The (?-s) first part ensures that the dot special character ( . ) represents a single standard character and not any End of Line character Then the part (.+):, look, from beginning of line ( ^ ), for the longest non-empty range of standard characters, followed by the last colon of each line, which is stored as group 1, due to round brackets Finally, the part (.+), grabs all the remaining standard characters of the current line ( = all text after the last colon character ) and stores them in group 2 Best Regards, guy038
  • 0 Votes
    5 Posts
    3k Views
    chcgC
    Which type of installation do you use? Notepad++ Installer 32-bit x86: Take this one if you have no idea which one you should take. Notepad++ zip package 32-bit x86: Don’t want to use installer? Check this one (zip format). Notepad++ 7z package 32-bit x86: Don’t want to use installer? 7z format. Notepad++ minimalist package 32-bit x86: No theme, no plugin, no updater, quick download and play directly. 7z format. The autoupdater is named gup.exe under Notepad++\updater and has a corresponding config file gup.xml. Gup.xml could be modified to avoid that the update page could be found or could be removed as in the minimalist package. The gpup.exe in the same folder is the updater for the plugin manager.
  • 1 Votes
    3 Posts
    2k Views
    Eric GrudinE
    Ok, thanks.
  • Pasting formatted text copied from webpage in Firefox

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Claudia FrankC
    @Toni-Graham I’m a bit confused - does this mean you want to have the html source of that side? If so, right click on the page and choose view source, than copy/paste to notepad++. Cheers Claudia
  • file associations // open with

    5
    0 Votes
    5 Posts
    4k Views
    bub xyzB
    @Claudia-Frank Running npp as admin worked. I have never set it up that way and did not know. Thanks for your help :)
  • Regex: how to remove spaces that are not followed by letters or numbers

    12
    0 Votes
    12 Posts
    7k Views
    Js jSJ
    ouch!! try opening the original pdf file using Notepad++ you may get lucky, and the contents may be cleartext (not compressed) otherwise, try a different pdf to txt converter or try ocr software good luck
  • 0 Votes
    2 Posts
    4k Views
    gstaviG
    AFAIK, Global Default is the basis. Usually Default Style is the only place where you select a mono space font and its size which will be used by all other styles. Language specific styles will override the Default by applying color and background but most of them do not change the font itself or its size. Sadly it seems that background is always overridden by language styler instead of using the default. Global Override has specific enablers that can override specific aspects for all documents regardless of language style. You can force dark background for everything but since language specific stylers will still use dark fonts you will get hard to read dark on dark and possibly even invisible black on black. I never used it. Respecting the windows scheme is not practical in this case since you need to use ton of different colors during syntax highlighting. Windows scheme is mainly for single color on single background. I don’t remember Visual Studio respecting it but maybe I just never tried. You do have several downloadable NPP schemes that are maintained with hard work.
  • Where did the "Help" / documentation go?

    Locked documentation help
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Restore PRIOR editing tab window upon closing another

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Own language highlighting with regex expressions?

    4
    0 Votes
    4 Posts
    9k Views
    Scott SumnerS
    @Manolo-Müller-Menendez I see you’ve posted exactly one time, so maybe the odds are good that you aren’t lurking and just waiting on an answer to your question, but since @Js-jS has refreshed this old thread, and @Claudia-Frank just yesterday posted something that may work to solve it, have a look at: https://notepad-plus-plus.org/community/topic/13183/poorman-regex-based-styler-lexer