New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcuts do delete line or word #432

Closed
raczkow opened this Issue Dec 23, 2016 · 29 comments

Comments

Projects
None yet
3 participants
@raczkow

raczkow commented Dec 23, 2016

I started to use QOwnNotes about month ago I I found it a great application. I moved my markdown notes from Atom, and one of the most feature I miss from it are shift+del shortcut to delete whole line and ctrl+del shortcut to delete whole word. Is it possible to implement this in QOwnNotes?

@raczkow raczkow changed the title from Shortcut do delete line to Shortcuts do delete line or word Dec 23, 2016

@pbek pbek added the enhancement label Dec 23, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Dec 23, 2016

Thank you for your kind words. I'll take a look into that.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 25, 2016

Currently Ctrl + Backspace is deleting a word.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

16.12.14

  • you can now delete the current line in the note text edit with Alt + Backspace (or + Backspace under macOS)
  • you can now delete the current word in the note text edit with Ctrl + Backspace (or Alt + Backspace under macOS)

@pbek pbek added this to the 16.12.14 milestone Dec 27, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

of course you are free to set other shortcuts in the settings

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

There now is a new release, could you please test it and report if the new features work for you?

@raczkow

This comment has been minimized.

raczkow commented Dec 27, 2016

Wooow. That was fast!
Works like a charm. Thank you.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

Great, thank you for testing.

@pbek pbek closed this Dec 27, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

Note that you change the shortcuts in the settings.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 3, 2017

Posting here on request of @pbek.

When I 'Delete line' the cursor moves up. Is it possible to make this behave like other editors and have the cursor stay on the same linenumber?

Thanks for looking into this!

@raczkow

This comment has been minimized.

raczkow commented Aug 3, 2017

+1 :-)

@pbek

This comment has been minimized.

Owner

pbek commented Aug 5, 2017

17.08.2

  • the Delete line function now only deletes the text to the beginning of
    the line and not the whole line to mimic the behavior of other text editors
@pbek

This comment has been minimized.

Owner

pbek commented Aug 6, 2017

There now is a new release, could you please test it and report if it works for you?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 6, 2017

@pbek Thanks for the fast implementation! We are almost there ;)

  • Delete line should remove the contents + the \n on that line
  • The cursor should stay on that linenumber (which now displays the content of the line below the line that got removed)

Implementing it like this will also make sure that when deleting an empty line, only the \n will be removed, the cursor will stay the the same position and the content of the line below the deleted line will be moved up. In the current situation the latter is not true: now the cursor moves up a line. This should not happen :)

Hope this clarifies. I could also do a quick movie. If you run any editor (e.g. sublime text or atom) you can also look at how it's implemented there.

Thanks!

@pbek

This comment has been minimized.

Owner

pbek commented Aug 6, 2017

I was trying to mimick the delete line behavior of Sublime text...

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 6, 2017

I was trying to mimick the delete line behavior of Sublime text...

Well, you almost got it ;)

See my explanation above for the (small) difference.

@pbek

This comment has been minimized.

Owner

pbek commented Aug 17, 2017

For me Shift + Ctrl + K in Sublime Text doesn't remove the \n of the line if it deleted text from it...
What in particular should be changed in your opinion? (and why)

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 17, 2017

I hope we are talking about the same thing. I'm using ST3.

A gif is worth a thousand words ;)

peek 2017-08-17 22-25

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

17.08.7

  • the Delete line function now pulls the text from the bottom up
@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

There now is a new release, could you please test it and report if it works for you?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

Sounds good! Will check as soon the package for ArchLinux is available 👍

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

AUR was just updated, in case you are using that...

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

aur/qownnotes           17.08.6-1        17.08.7-1                     

That was quick. Installing now...

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

Thanks for the quick update. I don't know if I see the new behavior, but Delete line now works like:

peek 2017-08-21 18-47

  • At first Delete line does not delete the \n, only the text
  • When the line is empty, Delete line does delete \n, but moves the caret to the end of the line above. It should stay where it was. The line below should have come up.

Again, I hope we are discussing the same thing!?

Thanks for all the effort 💯

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

BTW it might be an idea to show how it works on your install - maybe I've messed up my version. Peek is a handy tool for making animated .gifs (if you are on linux).

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

Strange, the cursor wasn't supposed to go to the end of the line and it didn't when I tested it. I'll take a look at that. Thanks for the link!

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

I just tested on Manjaro via AUR and it worked as it should, are you sure you've got the correct version installed already?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

This is weird:

λ pacman -Q |grep qownnotes
qownnotes 17.08.7-1

and

image

😬

I had to suspend while pacaur was downloading. My bet is that this is the cause. Will install again.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Aug 21, 2017

Works flawless in the new version, thanks for all the effort man!

@pbek

This comment has been minimized.

Owner

pbek commented Aug 21, 2017

Finally, thank you for testing! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment