Emacs keybinding Ctrl-k (delete line)

Hi, the delete line function in Idea deletes the whole line. In Emacs
the kill-line function deletes only from the caret and the text to the
right.

Is there a similar function in Idea?

Thanks
Per Thomas


9 comments
Comment actions Permalink

Unfortunately not!
Sorry

Jacques
"Per Thomas Jahr" <perja@nr.no> wrote in message
news:3E226B09.7070105@nr.no...

Hi, the delete line function in Idea deletes the whole line. In Emacs
the kill-line function deletes only from the caret and the text to the
right.

>

Is there a similar function in Idea?

>

Thanks
Per Thomas

>
>


0
Comment actions Permalink

Ctrl-Y

Hi, the delete line function in Idea deletes the whole line. In Emacs
the kill-line function deletes only from the caret and the text to the
right.

Is there a similar function in Idea?

Thanks
Per Thomas


Best regards,

Eugene Belyaev
JetBrains, Inc
"Develop with pleasure!"

0
Comment actions Permalink

Oh sorry, Shift-End, Delete

Ctrl-Y

Hi, the delete line function in Idea deletes the whole line. In Emacs
the kill-line function deletes only from the caret and the text to the
right.

Is there a similar function in Idea?

Thanks
Per Thomas


Best regards,

Eugene Belyaev
JetBrains, Inc
"Develop with pleasure!"


Best regards,

Eugene Belyaev
JetBrains, Inc
"Develop with pleasure!"

0
Comment actions Permalink

Thanks, is it possible to bind these key combainations to a shortcut?
Like a macro?

Per Thomas

Eugene Belyaev wrote:

Oh sorry, Shift-End, Delete

>>Ctrl-Y
>>
>>
>>>Hi, the delete line function in Idea deletes the whole line. In Emacs
>>>the kill-line function deletes only from the caret and the text to the
>>>right.
>>>
>>>Is there a similar function in Idea?
>>>
>>>Thanks
>>>Per Thomas
>>>
>>>
>>
>>Best regards,
>>
>>Eugene Belyaev
>>JetBrains, Inc
>>"Develop with pleasure!"
>>


Best regards,

Eugene Belyaev
JetBrains, Inc
"Develop with pleasure!"



0
Comment actions Permalink

Not yet. Maybe macros are going to be in the next release... Eugene??
In the meantimes I haven't played with this plugin but it might solve your
problem http://www.intellij.org/twiki/bin/view/Main/MacrosPlugin. If it does
please post your findings here. I would be interested. I just do not have
the time right now to investigate myself.

Jacques
"Per Thomas Jahr" <perja@nr.no> wrote in message
news:3E23E172.4090402@nr.no...

Thanks, is it possible to bind these key combainations to a shortcut?
Like a macro?

>

Per Thomas

>

Eugene Belyaev wrote:

Oh sorry, Shift-End, Delete

>
>>Ctrl-Y
>>
>>
>>>Hi, the delete line function in Idea deletes the whole line. In Emacs
>>>the kill-line function deletes only from the caret and the text to the
>>>right.
>>>
>>>Is there a similar function in Idea?
>>>
>>>Thanks
>>>Per Thomas
>>>
>>>
>>
>>Best regards,
>>
>>Eugene Belyaev
>>JetBrains, Inc
>>"Develop with pleasure!"
>>
>
>

Best regards,

>

Eugene Belyaev
JetBrains, Inc
"Develop with pleasure!"

>

>
>


0
Comment actions Permalink

Jacques,

Looks like plugin won't be larger than 5 lines of meaningful code too.

--
Best regards,
Mike Aizatsky.
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


0
Comment actions Permalink

Let see:

editor = context.getEditor();
offset = editor.getCaretModel().getOffset();
line = editor.getCaretModel().getLogicalPosition().line;
endOfLineOffset = editor.getDocument().getLineEndOffset(line);
editor.getDocument().deleteString(offset, endOfLineOffset);

5 it is! How amazing! Mike, how did you know? Would you happen to work for JetBrains?

Now you just need to open up that key stroke assignment from the open api that Dimitry is complaining about and everything would be great! ;)

Except it would still be great to have a true macro recording facility... again a la emacs ;)

Jacques

"Mike Aizatsky" <mike@intellij.com> wrote in message news:b01dl9$s91$1@is.intellij.net...

Jacques,

Looks like plugin won't be larger than 5 lines of meaningful code too.

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Great! Finally I got my Ctrl-k again. Thanks to Mike and Jacques.

This is what I did:

1. Download the macro plugin:
http://www.intellij.org/twiki/bin/view/Main/MacrosPlugin

2. Download the macro KillRestofLineFromCaret:
http://www.intellij.org/twiki/pub/Main/MacrosPlugin/KillRestofLineFromCaret.zip

Thanks
Per Thomas



Jacques Morel wrote:

Let see:

editor = context.getEditor();
offset = editor.getCaretModel().getOffset();
line = editor.getCaretModel().getLogicalPosition().line;
endOfLineOffset = editor.getDocument().getLineEndOffset(line);
editor.getDocument().deleteString(offset, endOfLineOffset);

5 it is! How amazing! Mike, how did you know? Would you happen to work
for JetBrains?

Now you just need to open up that key stroke assignment from the open
api that Dimitry is complaining about and everything would be great! ;)

Except it would still be great to have a true macro recording
facility... again a la emacs ;)

Jacques

"Mike Aizatsky" <mike@intellij.com <mailto:mike@intellij.com>> wrote in
message news:b01dl9$s91$1@is.intellij.net...
> Jacques,
>
> Looks like plugin won't be larger than 5 lines of meaningful code too.
>
> --
> Best regards,
> Mike Aizatsky.
> ------------------------------
> JetBrains, Inc / IntelliJ Software
> http://www.intellij.com
> "Develop with pleasure!"
>
>



0
Comment actions Permalink

Ctrl + Y = Delete Line
Shift + Delete = Delete Line
Shift + End + Delete = Delete Line from Caret

Or, did you have something else in mind?

David
JetBrains, Inc.
"Develop with pleasure!"


0

Please sign in to leave a comment.