7 ms·
Notably he was also answering other questions in the AMA, so it possibly only took him 2 minutes. It is not a difficult feature to implement anyhow, it probably
by sophistication 8y ago
Notably he was also answering other questions in the AMA, so it possibly only took him 2 minutes. It is not a difficult feature to implement anyhow, it probably went like this:
vim tools/Text.js
self.addEventListener('click', function (e) {
if (e.detail === 3) {
self.selectAll();
}
});
:wq
git add tools/Text.js
git commit -m "Add triple click select all"
git push origin master
Done.
- mcintyre1994 8y agoNeat, I didn't know about detail on mouseclick events :)
- AltruisticGap 8y agoThe main view is a canvas. Regardless, my hunch is event delegation would be more performant.
- IvanK_net 8y agoAlmost ... but I use Notepad++ instead of Vim. And I had to implement the search for the first and the last character in a line according to the layout. It took me about 10 minutes :)
- pwaivers 8y agoThis is super interesting :). Just curious, why don't you use a more advanced code editor than Notepad++?
- IvanK_net 8y agoThanks :) I already discussed it here: https://news.ycombinator.com/item?id=15924664 https://news.ycombinator.com/item?id=15924664
- umvi 8y agoI'm always amazed when people ship cool software with what I judge to be crappy, obsolete, or even downright dangerous processes/practices. Yet even though I (by my own judgement) use superior processes and practices (VSCode + Git + CI pipelines, etc.), I haven't shipped anything nearly as cool. A few others that come to mind are KeePass/Dwarf Fortress (no formal VCS), and GRRM (uses WordStar 4.0 in DOS)
- gammateam 8y agoHe could have done this just as fast using GIT + CI. VSCode would have likely slowed him down with indexing, and he already knows where all his files are so there wouldn't be any gains from hopping around function declarations with the click of a mouse Although you didn't pinpoint a single process that was inferior, knowing when to break processes is part of the experience.
- softawre 8y agoMaybe you spend too much time on processes, getting things right, and less time on actually shipping something useful?
- yakovdk 8y agoI kind of put vscode in the same category as notepad++. Actually, as a text editor, I think N++ has some nice features that vscode doesn't (like macros, I think).
- williamdclt 8y agoVSCode definitely has macros :) I don't think there's much that notepad++ has but VSC doesn't
- yakovdk 8y agoAh, I checked there seems to be an extension that lets you write macros in a JSON file: https://marketplace.visualstudio.com/items?itemName=geddski.macros https://marketplace.visualstudio.com/items?itemName=geddski.... But there seems to have been no movement on this request for a functional macro feature: https://github.com/Microsoft/vscode/issues/4490 https://github.com/Microsoft/vscode/issues/4490
- kakarot 8y agoCool project. Playing around with it now and I love what I see. Must have been very fun learning about how to implement image filters and such along the way. Any particular reason you choose Notepad++ over a full-featured IDE for a project of this scope?