• Adding File Types

    5
    0 Votes
    5 Posts
    3k Views
    Lycan ThropeL

    @PeterJones ,
    Thanks, @PeterJones , I didn’t know that either. Although it never really bothered me much doing the Save As and putting the extension on, I usually create my files in the dBASE IDE to create the forms and method stubs, and then edit the methods with Notepad++ when I’m working on making a program work in the IDE at the same time, because I don’t have to close NPP like I do the IDE editor to run the program. It makes compile,run,edit much quicker to work on the code of the program, that way. I just tried the language switch, and it did start using my UDL without even having to name the file first, so…kudos for the tip. :-)

    I started to answer @Fred, but realized the File Associations might not have been what he was looking for, so I deleted it.

  • How to use VS Code keymap in Notepad++?

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Ooker ,

    You would have to figure out the mapping between every VSCode command, and its Notepad++ equivalent, and then figure out how to translate the VSCode keymap syntax into Notepad++ shortcuts.xml syntax, using that mapping table. It would be a huge effort.

    As far as I know, no one has ever posted in this Community forum that they have such a mapping already, so you’d likely have to do this yourself.

    (For some reason, I doubt that you’ll be willing to…)

    Sorry to be the bearer of bad news.

    The article FAQ: List of Notepad++ key combinations, available for shortcuts doesn’t seem to provide anything.

    If you had said “it doesn’t answer my question”, that would have been at least accurate. As it stands, that phrasing claims that there is no information in that FAQ, when in reality, there is lots of information in that FAQ, which has proven useful to many people – it’s just not the information you were looking for. But since the FAQ specifically says it’s about the key combinations available to shortcuts, I think it accomplishes exactly what it claims.

    That FAQ doesn’t have anything specific on the shortcuts.xml file format, because that format is already documented in the User Manual’s Config File Details, and our FAQs aren’t going to replicate the entire User Manual, as they serve two different purposes.

  • 0 Votes
    2 Posts
    2k Views
    dr ramaanandD

    @Srinivasan-k-d Simple, type Srini\RVasan in the Find what field and Srini Vasan in the Replace with field, tick the Regular expression mode and hit Replace, you will get Srini Vasan. Then, type Sachin\RTendulkar in the Find what field and Sachin Tendulkar in the Replace with field, tick the Regular expression mode and hit Replace, you will get Sachin Tendulkar. If there are some white spaces in between Srini and Vasan and Sachin and Tendulkar, use \s* instead of \R. Then, press ctrl + h (Shortcut for replace). Then, in the Find what zone, type ^\R ( for empty lines only) or ^\h*\R ( for empty lines with blank spaces only) and leave the Replace with zone empty. Then, tick the Wrap around option. Then, select the Regular expression search mode. Then, click on the Replace All button and all the blank lines will be removed.

  • search doesn't find words outside the view anymore

    3
    0 Votes
    3 Posts
    181 Views
    Joan BosJ

    @pnedev Thank you for the info.

  • Edit 1 line and another line gets edited as well (copy - pasted text)

    7
    0 Votes
    7 Posts
    485 Views
    PeterJonesP

    @A-Former-User said in Edit 1 line and another line gets edited as well (copy - pasted text):

    I’m gonna revert to 8.5.8 until they provide a option to deactivate it.

    Already exists. Notepad++ v8.6.3 and v8.6.4 have Settings > Preferences > Editing 2 > ☑ Enable Multi-Editing, as mentioned in the v8.6.3 and v8.6.4 announcements and already updated in the User Manual.

  • How to eliminate auto tabs?

    6
    0 Votes
    6 Posts
    1k Views
    PeterJonesP

    @Nicholas-Piazza-0 said in How to eliminate auto tabs?:

    The spacebar would only insert that line of tabs after I started a new line.

    Spacebar does not insert a line of tabs, even after hitting enter to start a new line.

    When you have auto-indent turned on, hitting ENTER at the end of one line will create a new line, automatically indented with either spaces or tabs, depending on your active language’s tab settings (Settings > Preferences > Language > Tab Settings). It’s the creating-new-line-using-ENTER that puts in the indentation spaces or tabs.

    Your screenshot was insufficient for me to tell you what’s going on:

    You didn’t include the line numbers, so I cannot see if you have line wrap on You didn’t include context, so I cannot see the line before where you hit ENTER, so I cannot guess how far it should be indented You didn’t include the status bar at the bottom, so I don’t know what file language you have active

    Also, you should share your settings for Settings > Preferences > Language > Tab Settings for the language of your active file, because then we know what your tab settings are for that language.

    Even better, a screen-capture-video animated gif, showing your current file, then you clicking and hitting ENTER, then showing you typing the space, would show us exactly what’s going on. (I use screentogif to capture and automatically upload to imgur, then embed the imgur image using syntax ![](https://i.imgur.com/nASYsAz.gif) to have the forum show the animated gif from imgur’s site – making sure to use the i.imgur.com URL. Unfortunately, while the forum allows pasting in static images like gif or png directly, without using an external host, animated gifs must be externally hosted. You can use any such tool you want; this is just a suggestion if you don’t already have one to use.)

    As it is, I just think your previous line is hugely indented (possibly with View > Word Wrap turned on, so you might have thought you were on a different line, even though you’re really just wrapped on the same line), and you hit ENTER, and since you have the active language set to indent using Tab characters, it indents with the correct number of tabs based on the previous line. I don’t think it’s the spacebar at all.

    update: actually, you might have a plugin that helpfully converts N leading spaces into another tab character, so maybe after you’ve typed 4 (or whatever N is for that plugin) spaces, the plugin automatically converts those to a single tab, and as you continue to hold down the spacebar, the plugin continues to convert the groups of N into another tab. Sharing your ?-menu’s Debug Info will show which plugins you have, and maybe someone here knows of a plugin that behaves that way (I do not, off the top of my head).

    update 2: And I have confirmed that something similar is true, natively: if your language is set to tab-indent, and you have mixed tabs and spaces at the beginning of a line (like cb803e9c-cfbc-4eab-811d-fe04e1017d0f-image.png ), if you hit TAB at the end of that line, it will convert them all to tabs (874df7ec-d40b-4fe8-8535-4cdc164f69b3-image.png )

  • help thanks

    9
    0 Votes
    9 Posts
    532 Views
    mkupperM

    I assume the OP’s cat or young child has has discovered the screen shot button. The list of open tabs is fascinating, are they trying to randomize their own disk or are they lost? It reminds me of “On a clear disk you can seek forever.”

    Thank you @Mark-Olson for the \h tip. I had forgotten about that one when replying on another thread where someone used \s not realizing it also includes the end of line characters. I had not thought about it but \h is the horizontal spaces, \v is the vertical spaces, and \s is space in general.

  • regex regex

    3
    -3 Votes
    3 Posts
    192 Views
    PeterJonesP

    @sozdan53 / @DGS-DGS ,

    Stop spamming the forums with multiple copies of the same posts.

    One of your accounts is in the process of being banned, and if you continue this anti-social behavior, your other will be too

  • Notepad last all session not opening

    3
    0 Votes
    3 Posts
    255 Views
    xomxX

    @utkarsh-patil said in Notepad last all session not opening:

    I using notepad ++ version v7.8.6 (64bit)

    You need to upgrade at least to v8.4.7 (better v8.4.9+), where that Windows shutdown/restart Notepad++ bug has been fixed.

    Its due abort shutdown??

    Yes.

  • Possible to Change Color of Hyperlinks in Text File?

    Locked
    2
    0 Votes
    2 Posts
    220 Views
    Alan KilbornA

    @DeeTNBlazer

    Please don’t post the same thing twice, in two different threads. REF
    Realize that it is the weekend and people are taking time off to do other things than be behind the keyboard.
    I’m sure that someone will reply to your query before too much longer.
    And if not, reposting in a new thread isn’t going to do anything but annoy…

  • Possible to Change Case using Search/Replace or Other

    4
    1 Votes
    4 Posts
    227 Views
    Dennis SchroederD

    Mark…THANK YOU!!! I checked this is my quick sample and it worked perfectly. I will test it in the live export file on Monday.

  • Help with Find please?

    2
    1 Votes
    2 Posts
    144 Views
    Alan KilbornA

    @Teresa-Mendoza

    A couple of ideas, if your word is apple:

    do a Find Next in Regular expression mode for ^.*apple.* with . matches newline unchecked – this will select the entire line of a match, so it is ready for Ctrl+c copy or Ctrl+x cut

    do a Find All in Current Document (in any search mode) for apple – this will opening the Search results panel which presents results on an entire line basis; right-click a hit line(s) and choose Copy Line(s) from the popup menu (sorry, no way to “cut” the original line with this method)

  • Renaming and saving text files based on its content

    3
    0 Votes
    3 Posts
    325 Views
    dr ramaanandD

    @Sam-Cem You can click and read How to replace a particular “url” with “url” of each webpage in multiple files using Notepad++? - I used the solution 2 mentioned at codeproject.com (the link to the codeproject.com webpage can be seen if you click the link I have mentioned above - do not click on the, “codeproject.com” link mentioned here).

  • Function list regex debugging

    25
    1 Votes
    25 Posts
    2k Views
    Alan KilbornA

    @Lycan-Thrope said in Function list regex debugging:

    but also still on occasion use the Regex101 site, since i have the link in the same menu area as the Notepad++ links, so it’s quick and easy

    I have my Run menu set up with a command to “Launch RegexBuddy”, thus making it as simple as what you’re saying that you have for regex101.

    RegexBuddy has a lot of options because it is very powerful. It’s always a struggle between simplicity and power, where a UI design is concerned – just consider Notepad++ itself.

    But we’ve probably strayed off-topic too much with talk of RegexBuddy.

    The important point I wanted to make was that people continually use regex101 and then, for more complex expressions, complain that Notepad++ isn’t acting the same way…and the reason for that is that they use different engines and neither one is wrong (but there is only something wrong when you compare different results obtained).

  • removing lines

    4
    0 Votes
    4 Posts
    219 Views
    Cal MurphyC

    @Coises said in removing lines:

    (?x-is) \A [\s\S]+ (?= ^ Extraction \x20 Log \R) | \x20 ( .+ (?= . \x20 Filename )

    Thankyou that looks like it as worked, much appreciated.

  • Regex with unexpected repeat application

    4
    0 Votes
    4 Posts
    306 Views
    Terry RT

    @Coises said in Regex with unexpected repeat application:

    Most likely the original poster has Settings | Preferences… | Searching | Replace: Don’t move to the following occurrence unchecked (I believe unchecked is the default), and is literally repeating both Find Next and Replace.

    I never knew that setting was there and was trying to figure out why he had a different result to me. Thanks, good to know there are still some things to learn about NPP.

    Terry

  • How to find string in range?

    8
    1 Votes
    8 Posts
    372 Views
    PeterJonesP

    @Hardik-Shah

    10.116.10.0 - 10.116.10.31
    10.116.10(0[0-2]|1\d|3[0-1])
    what I am doing wrong

    First, . means “match any character”, so that’s not what you mean. You should use \. to match a literal dot character.

    Second, you didn’t have a dot at all between the 10 and your group, so you are effectively looking for 10.116.10 followed by two more digits (with restrictions), but not looking for a dot in between. Your group say that it wants to match:

    either 0 followed by 0 or 1 or 2 or 1 followed by any digit or 3 followed

    Thus, you are trying to match

    10.116.1000 - 10.116.1002 or 10.116.1010 - 10.116.1019 or 10.116.1030 - 10.116.1032

    ----

    10.116.15.32 - 10.116.15.63
    search 10.116.15(3[0-2]|1\d|6[0-3])

    Again, you are missing the backslash before all the dots, and you are missing the dot between 15 and the final. And that one will thus match

    10.116.1530 - 10.116.1532 10.116.1510 - 10.116.1519 10.116.1560 - 10.116.1569

    And you haven’t told the regex anything about the .40-.49 or .50.59 range, so you cannot very well expect those to match (even if you fix the other problems)

    Hopefully, this explanation for why your attempts didn’t work, combined with @Coises earlier explanation, will help you understand where you are going wrong.

    If you cannot figure it out, the next time you show an example, and what you tried, also try to explain why you think it will work (explaining what every character or group of characters in the regex is doing), and we can then tell you why your explanation is wrong.

    But, as you have found, regex is not an easy way to find values within a mathematical range, especially for something complicated like an IP address. Every time you want to change the range, you will have to completely reconfigure your regex, and that’s going to get annoying for you. If you were using a programming language that had a library that can parse/understand IP addresses (any language worth its salt will have such a library), you could much more easily find IPs withing ranges, rather than relying on making a new custom regex for every range you want.

  • Directory under "Find in Files"-Search do not remember last folder

    3
    0 Votes
    3 Posts
    214 Views
    Alan KilbornA

    There really is no good reason for the Directory box to be auto-populated with the notepad++.exe folder in the case where Find in Files is invoked when a soft-named tab is currently active, thus I’ve created an ISSUE for it (I don’t consider it a bug, just an undesirable).

  • Through the title bar ?

    10
    0 Votes
    10 Posts
    2k Views
    E

    @xomx Thanks! That worked!

  • How to remove duplicate words in a list that are not consecutive?

    8
    0 Votes
    8 Posts
    849 Views
    Alan KilbornA

    @Debojit-Acharjee said:

    I can use script but I want to know why the “Remove Duplicate Lines” feature of “Line Operations” in Notepad++ doesn’t work when there are more than 30 thousand lines? Is there any thing to do with the CPU register memory?

    The best way to explore this is to create an “issue” on the official bug reporting site (see HERE for info on that) and attach the 30K+ file where it fails.