Skip to content
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

Delete a line #63

Closed
RuiNelson opened this issue Apr 23, 2016 · 14 comments
Closed

Delete a line #63

RuiNelson opened this issue Apr 23, 2016 · 14 comments

Comments

@RuiNelson
Copy link

It's a common action. Should have a shortcut.

@zyedidia
Copy link
Owner

#70 should do that for you now with Ctrl-k.

@guai
Copy link

guai commented Feb 14, 2018

ctrl+k is not very intuitive imo
I tried ctrl+shift+d (notepad2) and ctrl+y (intellij idea/jedit) and then googled

@guai
Copy link

guai commented Feb 14, 2018

notepad++ used ctrl+shift+L
it seems there is no consensus here, but I think its better to use one of these. At least some people could guess right away

@DanielPower
Copy link
Contributor

You're welcome to change your keybindings. And also, if you press Alt+g it will show on-screen a number of common keyboard shortcuts, including this one.

@TennisGazelle
Copy link

Ctrl-K was actually the way it's typically used with Nano. This seems fine.

@AlexWayfer
Copy link

#70 should do that for you now with Ctrl-k.

"Delete" is not the same as "Cut". If I have something in the buffer, and want to delete some lines — I can't use "Cut the line".

@aerth
Copy link
Contributor

aerth commented Sep 6, 2018

@AlexWayfer, in nano, ctrl+k cuts a line. in vim, dd cuts a line

can you delete a line without cutting in these editors?
i think u must paste your buffer, cut the line, re-copy buffer

@AlexWayfer
Copy link

@AlexWayfer, in nano, ctrl+k cuts a line. in vim, dd cuts a line

can you delete a line without cutting in these editors?

  1. Ctrl+K in nano doesn't overwrites system buffer (Ctrl+Shift+V)
  2. The same with dd in vim: you can paste cut thing with p or system-wide with Ctrl+Shift+V in the insert mode.
  3. Ctrl+K in micro overwrites system buffer.
  4. Why do you takes these examples? mc (mcedit) has F8 for deleting line without cutting.

@aerth
Copy link
Contributor

aerth commented Sep 11, 2018

ah i see, the system buffer is overwritten when cutting a line.

what would be a good fix for that?

@AlexWayfer
Copy link

ah i see, the system buffer is overwritten when cutting a line.

what would be a good fix for that?

I'm OK with the one buffer, system, instead of two, system + application. But I think there should be a shortcut for deleting a whole line, not cutting. I'm personally prefer Ctrl-Shift-Backspace, but it can be even F8, like in Midnight Commander. Atom Editor has Ctrl-Shift-K by default for this (without buffer changing).

Anyway, I think this issue should be opened because it's about deleting, not cutting.

@zyedidia
Copy link
Owner

You can rebind Ctrl-k if you would like or use a new keybinding entirely:

{
    "CtrlK": "SelectLine,Delete"
}

@AlexWayfer
Copy link

You can rebind Ctrl-k if you would like or use a new keybinding entirely:

OK, thanks, it looks working. But Alt-g: show bindings still shows ^K Cut line — should it be a new issue?

@bharatagarwal
Copy link

Is there a way to modify the content of the bindings shown by Alt-g?

I modified CtrlK to delete a line rather than cut it, and was hoping I could update those shown by Alt-g to reflect this change.

@DonCammne
Copy link

Hi, I have a problem, when I use Ctrl-k, micro says that's Recording and if I press again, it says Stopped Recording.

I'm trying to modify the keybindings (to have DeleteLine) but it's not working. I'm able to modify other keybindings (for example Ctrl-d with DeleteLine) but not Ctrl-k.

I'm on EnOS with AwesomeWM and Alacritty for the terminal. Zsh for the shell. Everything is up to date (I'm installing everything from blank).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants