• Better CSV columns?

    4
    0 Votes
    4 Posts
    5k Views
    CoisesC

    You might be able to use my plugin Columns++ to help with this. See the help sections on Elastic tabstops and the Convert separated values to tabs… command.

    Elastic tabstops is a conceptually simple algorithm defined by Nick Gravgaard for aligning tab-separated text. It works by treating each tab as a column separator and then making each column just large enough to hold its contents, much like the way a simple HTML table works.

    In most cases, Convert separated values to tabs should be able to transform a csv file into tab-separated values without confusion.

    There are some other handy functions in the plugin for working with data arranged in columns as well.

    I currently consider the plugin to be in an “alpha” state. I use it, and I haven’t been seeing many problems reported, but it could be that hardly anyone is using it. If you use it, please let me know if you encounter any problems.

  • I need to insert a special character at the beginning of a line

    3
    0 Votes
    3 Posts
    699 Views
    JustinJudoJ

    @PeterJones Thank you Peter, I appreciate the solution. Man you’re so good with this stuff… I wish I knew how to do RegEx. I’ve looked it before but it just seem so difficult to learn!

  • Protect Lines Within Tabs

    8
    0 Votes
    8 Posts
    738 Views
    EkopalypseE

    @Alan-Kilborn @Coises

    without having more information about how exactly such a feature is supposed to work, it’s hard to say whether locking part of a text with this style attribute is sufficient. For example, if this “locking” only happens after several edits, I’d be surprised if a few “undos” didn’t reset the text. Never tested it.

    @Douglas-Schneider - there is a possibility that a Python script could be used via the PythonScript plugin, but one would need more information on how it should work.
    Questions I’m thinking of include.
    Are the files only on the hard drive or also on the network, on a USB drive, etc.?
    Is the file only ever edited by one person, or perhaps multiple users?
    Is the area locked when the file is loaded or at any time?
    Does only text need to be locked for files that don’t use another lexer, e.g. text doesn’t have a lexer, but xml or json files do.
    What must be done when ending a npp session or closing the file or starting npp and loading a file?
    Etc …
    If you can specify your requirement and are willing to go the a python script solution way, we might be able to offer you something.

  • Find with regex a particular word between 2 lines

    6
    0 Votes
    6 Posts
    350 Views
    Vasile CarausV

    @wonkawilly I need a regex, because I wanna FIND and REPLACE in several html files…

    I find a solution, super

    FIND: </table>\r\n\K(<.*>)|K\r\n<p class="text_obisnuit">

    interesting is that I used K instead of \K

  • Bana yardım edin lütfen

    11
    0 Votes
    11 Posts
    444 Views
    PeterJonesP

    @İhsan-Akdaş said in Bana yardım edin lütfen:

    but everyone I watch videos can edit it,

    I just noticed this statement: you should re-watch the video, because a rewatch will probably show you that you picked the wrong file to edit, or it will show you how the video said to make the changes.

  • Shell extension multiple files behavior change

    2
    0 Votes
    2 Posts
    196 Views
    PeterJonesP

    @fixmypcmike ,

    Starting in v8.5.1, the way the context menu was done was changed to work with win11, but has been having trouble with older versions of Windows. Subsequent releases have been trying to fix it for “everyone” with varying levels of success.

    Unfortunately for you, Win7 is not supported by Notepad++, so while it will hopefully soon work for win8.1 and newer, it may be that it won’t ever be in your default context menu on your decade-out-of-date OS. Of course, it’s really easy to manually add it to your registry yourself on Win7… ( use the forum search for registry and put my username as the author in the search advanced options, and you should find an example from me some years back.)

  • Screen location when Notepad++ restarts

    8
    0 Votes
    8 Posts
    1k Views
    Alan KilbornA

    @mkupper said in Screen location when Notepad++ restarts:

    Alt+spacebar to activate the shortcut menu is also useful to help locating a hidden or lost application as it will pop up on the edge of the monitor nearest to where the application is hidden or parked.

    Yes, this is a good tip, as it gives one a hint in what directional arrow to use (if one’s going to use the keyboard) in order to get the app back on-screen. However, if it is “far” away, the user may hold down the arrow key for a LONG time and think it isn’t working…

  • Notepad settings are reset after an abnormal shutdown.

    3
    0 Votes
    3 Posts
    222 Views
    wonkawillyW

    I have similar problems sometimes, even if I use Npp portable versions. Probably some file that Npp is writing to the disk gets corrupted cause of the abnormal shutdown.
    Nevertheless I frequently do a complete backup to a compressed archive of the folder with plugins and my customization and so on. So, just in case, I can delete the corrupted folder and decompress the whole Npp folder having back al my main customization ready to restart working in seconds.

    It is also possible even to implement a little script to make the Npp folder backup automatically.

  • Double entry in pop-up. How to remove?

    3
    0 Votes
    3 Posts
    463 Views
    wonkawillyW

    @Mugsys-RapSheet said in Double entry in pop-up. How to remove?:

    . Is there a simple fix?

    You could edit the right click menu on your OS with the tools embed into your OS it self: there are different methods to do it and some of them are dependent on the OS version your computer has. For example you could modify the OS Register with regedit, but you really need to know how to, so you first need to get used to it and read some tutorials online to work with this solution.
    Online there are also some applications (even free) that you can use to make a bit easier modifing the contextual right click menu for the targeted file type. For example Nirsoft ShellMenuView or ShellExView Shell Extensions Manager are small utilities that display the list of static menu items that appeared in the context menu when you right-click a file/folder on Windows Explorer, and allows you to easily enable or disable unwanted menu items. Of course there are also others.

  • Map language to extension

    9
    0 Votes
    9 Posts
    585 Views
    Alan KilbornA

    @Mark-Olson said in Map language to extension:

    print(f’{ext_lang_dict = }‘)
    print(f’{lang_ext_dict = }')

    As long as PythonScript 2.x is what is installed via Plugins Admin, we probably shouldn’t publish PS3-only scripts.

    Suggest changing these two lines to:

    print('ext_lang_dict:', ext_lang_dict) print('lang_ext_dict:', lang_ext_dict)

    and, of course, adding this line at the very top of the script file:

    from __future__ import print_function
  • Homemade UDL location

    3
    0 Votes
    3 Posts
    968 Views
    Sayanel01S

    @PeterJones Clear and perfect explanation, thank you!

  • How to save 1000+ fills at once?

    8
    0 Votes
    8 Posts
    856 Views
    Alan KilbornA

    @Junuk-Seo said in How to save 1000+ fills at once?:

    I am getting the error “‘Please check whether this file is opened in another program’”.

    This doesn’t make sense as the assumption was that the files are all new 1, new 2, etc files (as otherwise all you need to do is a Save All), and thus these “files” could not be open in another program. Perhaps that was a bad assumption.

  • Notepad++ file format looks different when opened in Windows Notepad

    3
    0 Votes
    3 Posts
    1k Views
    miltonM

    @PeterJones

    Yes, you are correct.
    Thank you so much for the clarification and instruction.

    The issue is solved. Thank you

  • can i recover text from notepad?

    15
    0 Votes
    15 Posts
    4k Views
    PeterJonesP

    @fomoiks ,

    Either you are mistaken, or something else weird went wrong. Either way, I cannot tell you why or how it happened.

    In 99.9999% of the cases, if you hit save, Notepad++ saves the file in the current path, or it will tell you something went wrong.

    At this point, the “why” is irrelevant. The only way in which continued delving into what exactly happened on your end would be helpful is if you had a way that could 100% reliably reproduce the problem of “I hit SAVE. File did not save.” – if you had “Steps to Reproduce”, then you could create an official bug report in the Notepad++ Issues tracker on github.

    Good luck.

  • Using Replace function in PShell to modify Workspace file

    6
    0 Votes
    6 Posts
    288 Views
    mkupperM

    @Cariboudjan said in Using Replace function in PShell to modify Workspace file:

    Alright. Changing the encoding to UTF8 fixed the issue.

    I am glad it seems to be working for you now.

    A couple of points:

    The encoding shown on Notepad++'s status line is an estimate based on inspecting the file. The inspection process is not perfect and so I would not load a file into Notepad++ and 100% rely on what it says the encoding of that file seems to be. I have had Notepad++ say “ANSI” for example even when the file has 3 or 4 byte long UTF-8 encoded sequences near the beginning. Figuring out the encoding of a file can be a long topic in itself. In your code I’m bothered by your use of -NoNewline -Encoding OEM. It just seems weird and is the sort of thing that will lead to unexpected results down the road. However, this forum is about Notepad++ and so I’ll leave it at that rather than topic-drifting into encoding and PowerShell.
  • 0 Votes
    6 Posts
    316 Views
    Alan KilbornA

    @Justin-Zant said in Saving a file saves the first new file instead of the unsaved file in the active window:

    I guess I have to get used to that shortcut.

    Or change it.

  • multiple lines in one line

    11
    0 Votes
    11 Posts
    8k Views
    PeterJonesP

    @Michael ,

    I will briefly explain my regex: but really, you should look at the documentation I linked you to.

    FULL: (?s)^(\d+\.\d+.*?$).*(<status>.*?</status>).*?</x-cisco-remotecc-request>

    (?s) = turns on “. matches newline” ^ = starts the match at the beginning of a line (\d+\.\d+.*?$) = looks for one or more digit, then a decimal point, then one or more digit, followed by everything to the end of the line, and because of the parentheses, puts it all into group #1 (referenced later as $1) .* = matches 0 or more characters, including the newline – hence, this allows it to match multiple lines at once (<status>.*?</status>) matches <status> and </status> surrounding text, and puts that unit into group #2 (referenced later as $2) .*?</x-cisco-remotecc-request> = finds all the characters up to and including the next </x-cisco-remotecc-request> closing tag

    Replacement: $1 $2 = replace everything matched above (from the beginning of the first line in the match all the way to </x-cisco-remotecc-request>) with just the contents of group 1, followed by a space, followed by contents of group 2.

    i do not understand how you go down all rows, till you find the value mentioned by <status>. what is the key operator for this?

    The .* when . matches newline or (?s) is enabled will match 0 or more characters including newlines, hence it can capture multiple lines between

    Status could be even on

    My regular expression handled that, because it accepted anything between the <status> and </status>, and put that into a group; Guy’s regex ignored your actual status portion, and just always replaced it with <status>off</status> (because your example only showed one value, and he assumed that you always wanted to convert the status to off because of the way you phrased things)

  • "Other View" not honoring Global Style Preferences

    3
    0 Votes
    3 Posts
    190 Views
    Vince HaganV

    @Alan-Kilborn That was it! I thought I had defaulted all of that, but I guess didn’t. Thanks!

  • Character count display as you type

    9
    0 Votes
    9 Posts
    2k Views
    PeterJonesP

    @Shahar-F-un-monitored-mail said in Character count display as you type:

    welcome to send the file with exact instructions for w10 (which btw was previously upgraded from w7 which may be the reason

    The instructions are identical for w7, w8, w8.1, w10, and w11.

    why the startup.py doesn’t seem to appear, at least in the standard folders for the alignment saving)

    You need the PythonScript plugin. And you need to create your “startup.py (user)”. The instructions for installing the plugin, and for getting the user startup file if you don’t already have one, are found in our FAQ on PythonScript

    Btw do I have to first upgrade the current version from 2022 64b

    Probably not (though if you want to, that’s fine, too). Any recent version of Notepad++ should be able to handle this – I’d probably recommend v8 or newer, but other than that, it should all be compatible. And PythonScript v2.0.0 will work.

  • Find/copy specific line in all opened files

    4
    0 Votes
    4 Posts
    2k Views
    Selva TNS

    @guy038 Thank you