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

tweak Ctrl-k behavior (request) #514

Closed
emanresusername opened this Issue Nov 25, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@emanresusername
Copy link
Contributor

emanresusername commented Nov 25, 2016

I'm used to zsh so i might be biased, but i almost always want Ctrl-k to only delete the current line, instead of deleting everything after the cursor

say i were to hit Ctrl-k in the following scenario, the | represents the cursor

{
|import com.duplicate.thing
import com.duplicate.thing
val lots = """
and
lots
of
lines
after
that
you
want
to
keep
"""
}

i'd prefer the result to simply remove the duplicate line, instead of the current behavior which would remove everything after the cursor and leave me with just

{

@lihaoyi lihaoyi added the enhancement label Dec 10, 2016

@lihaoyi

This comment has been minimized.

Copy link
Owner

lihaoyi commented Dec 10, 2016

Go ahead and send a PR; many of these commands were ported from Bash, which does not have multiple lines at all, so it makes sense to tweak them to be more useful in a multi-line context

@emanresusername

This comment has been minimized.

Copy link
Contributor Author

emanresusername commented Dec 11, 2016

haven't dug into the code base at all yet, any pointers on where to start?

@lihaoyi

This comment has been minimized.

Copy link
Owner

lihaoyi commented Dec 11, 2016

Probably here

simple(Ctrl('k'))((b, c, m) => cutAllRight(b, c)),

@lihaoyi

This comment has been minimized.

Copy link
Owner

lihaoyi commented Dec 15, 2016

Fixed by #529, should be out in the next unstable build

@lihaoyi lihaoyi closed this Dec 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.