nuttyartist / notes

Fast and beautiful note-taking app written in C++. Write down your thoughts.
https://www.get-notes.com
Mozilla Public License 2.0
3.68k stars 319 forks source link

Added alt+up/down shortcut to move current line #566

Closed zjeffer closed 1 year ago

zjeffer commented 1 year ago

This is something I've been meaning to add for a while, and it seems to work so far:

https://user-images.githubusercontent.com/4633209/229840697-82738395-0e3d-4f69-a398-99ca82f4af67.mp4

Basically, pressing alt + arrow up or down will move the current line up/down one line. It's especially useful when moving things around in a list of items. I use this feature a lot in VSCode, which is why I wanted to implement it here as well.

What do you guys think? Is this something useful for Notes? The implementation is kind of ugly but I don't see a better way to implement it, as the editor is kind of limited.

zjeffer commented 1 year ago

I just noticed it has a bug when working with multiline blocks of text (because of word wrapping), needs to be fixed.

nuttyartist commented 1 year ago

That's awesome! Of course it's useful, I, and am sure many other people use lists often. And yes, it works well but I also experience the multiline problem.

zjeffer commented 1 year ago

I added the shortcut to the keyboard_shortcuts.md file. I also removed the unnecessary qDebug() statements.

nuttyartist commented 1 year ago

Perfect. I'll need to remember to update the website shortcut keys upon release. Thanks! Merging...