Live data from Hacker News

NotepadNext – a cross-platform reimplementation of Notepad++

github.com

241–250 of 317 posts

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#241
post #195

Earlier quoted context omitted.

How do you select those two thousand strings?

Using VS Code: select whatever you want to match, then Ctrl+Shift+L

So it has to be two thousand identical strings? Then I don’t understand the benefit over search & replace.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#242
post #202
post #197

Cool! Notepad++ was one of the apps that I missed the most when I switched to Linux. Besides games, it was the number one reason that I kept rebooting into another OS. After a while, I learned emacs, then vim, and the rest is history. Today, I would probably have switched to Codium. As long as we agree not to use Sublime Text anymore.

I transitioned recently to Mac on new job and I was surprised to find the most painful thing was not havig Notepad++ and was super amazed I did not find comparable software on Mac.

Sublime is a massive improvement in my opinion, and cross platform. It's not free** but you can use a personal license at work and on multiple machines. It's one of the few text editors with a plug-in system that can reliably open 100mb+ files and auto reload on file updates (without crashing constantly).

https://www.sublimetext.com/

** it's sort of free, the trial period is unlimited. It just gives "activate me" popups every dozen file saves or something.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#243
post #197

Cool! Notepad++ was one of the apps that I missed the most when I switched to Linux. Besides games, it was the number one reason that I kept rebooting into another OS. After a while, I learned emacs, then vim, and the rest is history. Today, I would probably have switched to Codium. As long as we agree not to use Sublime Text anymore.

Geany is almost twenty years old.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#244
I used to use Metapad at times, apart from (mainly) gVim, on Windows.

https://liquidninja.com/metapad/

Development on it has stopped, IIRC, but it is still available for download.

I had used many other text editors earlier, such as TextPad, NPP, SciTE, PFE,etc., over the years .

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#246
post #14

Why would I choose notepad++ over something like vim or emacs? Is there a compelling differentiator?

Here's why I like it:

For a considerable time in my professional life I was forced to use Windows. I would still have access to Linux VMs, in which I spent most of my time, using vim as the editor but whenever I wanted to take quick notes, sanitize text, stash away some info I need in work etc., I'd just use the notepad on Windows.

Then I found Notepad++. The UX is just so great (though I never figured out how to delete all the line ending spaces and it's sometimes nagging me).

So I love both Vim and Notepad++, different use cases. Different reasons.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#247
post #241

Earlier quoted context omitted.

Using VS Code: select whatever you want to match, then Ctrl+Shift+L

So it has to be two thousand identical strings? Then I don’t understand the benefit over search & replace.

It goes further than just that -- for instance, lets say your data looks like this:

    [
        "foo bar/2322",
        "foo baz/4223",
        "foo blah/2232",
        ...
    ]
And you need to reformat that into:

    [
        "bar 2322: foo",
        "baz 4223: foo",
        "blah 2232: foo",
        ...
    ]
You can absolutely use a regular expression find/replace to solve this. But using multicursors, you can just highlight the first "foo ", then hold Ctrl+D to select all instances, then hit right arrow key so that your cursors are at "foo |bar/2322" (and nothing is selected) et al, then use shift+right arrow key to select bar, baz, blah, and all other substrings, then use ctrl+X to cut that list to your clipboard. Hit delete key to get rid of the /s and add a space so you can keep the fields separated. Then, use ctrl+arrow to move your cursors to just before foo ("|foo /2322"), paste, hit space. Now you have "bar foo 2322". Repeat the same action to cut all the "foo" substrings, then move your cursor to the end, now type ": " and then paste.

You get the idea. It sounds complex, but these are all just comprised of the same fundamental editing patterns-- all of the cursors act as if you had just that one cursor when you press the keys. You have to play with multicursors to really appreciate their power.

Most of the time, someone who is well versed with multicursors and their editor's cursor shortcuts (arrow keys, page up/down, shift/ctrl arrow keys, etc) will be able to complete these sort of textual manipulations much faster than using find/replace.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#248
post #241

Earlier quoted context omitted.

Using VS Code: select whatever you want to match, then Ctrl+Shift+L

So it has to be two thousand identical strings? Then I don’t understand the benefit over search & replace.

It doesn't have to be identical. For the method they're describing you just have to get search results -- so you can use regex in that. You can also just command-click anywhere you want to leave a new selection-point. (Or use various other find commands that search for things and add them to your selection pool.)

The benefit of it is that you're left with a cursor in each location, and you can then do absolutely anything that you'd normally do with a single cursor in every place at once. This includes things like copy/paste, which will maintain a separate buffer in each selection. This also includes things that're actually tough to do with normal find/replace -- I could select the bit after a search result and switch it to title-case, for instance.

You can do most things you'd use it for with find/replace. But sometimes it's easier to watch it happen as you type, rather than construct a fairly complex regex with groups and suchlike.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#249
post #105

Earlier quoted context omitted.

What are multiple cursors used for?

Any time you need to make the same edits in multiple places. I use it to mass edit array items for example by using the highlight / add cursor to identical text feature in VS Code (Ctrl+D). I even use it to copy data out of the browser and mass edit it into data structures-- often there will be some pattern to the pasted data even if it's garbage, so being able to quickly set up multicursors around the patterns in th…

Personally while there are some task that's easier with multiple cursors, I have personally yet to find any use case where regexp replace in selections doesn't work as well.

Re: NotepadNext – a cross-platform reimplementation of Notepad++

#250

Earlier quoted context omitted.

I hate cluttered flat surfaces as much as the next guy, but I don't put my toaster away when I'm not using it. It's stays right on the counter because it's convenient for it to be there.

> I don't put my toaster away when I'm not using it I actually do lol

Aren't you just generating crumbs at two locations now? The kitchen bench and cupboard? Possibly the floor too due to moving the toaster?
Post reply on HN