GithubHelp home page GithubHelp logo

Delete a line about micro HOT 14 CLOSED

zyedidia avatar zyedidia commented on August 21, 2024
Delete a line

from micro.

Comments (14)

TennisGazelle avatar TennisGazelle commented on August 21, 2024 5

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

from micro.

guai avatar guai commented on August 21, 2024 1

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

from micro.

AlexWayfer avatar AlexWayfer commented on August 21, 2024 1

#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".

from micro.

AlexWayfer avatar AlexWayfer commented on August 21, 2024 1

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?

from micro.

zyedidia avatar zyedidia commented on August 21, 2024

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

from micro.

guai avatar guai commented on August 21, 2024

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

from micro.

DanielPower avatar DanielPower commented on August 21, 2024

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.

from micro.

aerth avatar aerth commented on August 21, 2024

@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

from micro.

AlexWayfer avatar AlexWayfer commented on August 21, 2024

@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.

from micro.

aerth avatar aerth commented on August 21, 2024

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

what would be a good fix for that?

from micro.

AlexWayfer avatar AlexWayfer commented on August 21, 2024

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.

from micro.

zyedidia avatar zyedidia commented on August 21, 2024

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

{
    "CtrlK": "SelectLine,Delete"
}

from micro.

bharatagarwal avatar bharatagarwal commented on August 21, 2024

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.

from micro.

DonCammne avatar DonCammne commented on August 21, 2024

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).

from micro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.