Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Keyboard shortcut to cut line
Keyboard shortcut to cut line [message #298649] Thu, 02 February 2006 05:44 Go to next message
Eclipse UserFriend
Originally posted by: nomail.email.com

Is there a keyboard shortcut in Eclipse to cut a line?
Can I assign a key combination to do this?

Ctrl-D works well if you just want the line gone but it does not help if
you want to paste it somewhere else.

alt-arrows works ok if you are only moving a couple lines away in the same
editor but it is inconvenient most of the time

I got used to the speed of vi, this is the one feature I miss the most.
--

As a work-around is there a keyboard shortcut to select the current line
no matter where you are in it?

My current method is cumbersome:
1. press home key

2. Shift-End
3. Ctrl-X

There has to be a better way?

thank you.
Re: Keyboard shortcut to cut line [message #298653 is a reply to message #298649] Thu, 02 February 2006 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.eclipse.org

someone wrote:

> Is there a keyboard shortcut in Eclipse to cut a line? Can I assign a
> key combination to do this?

The 'Cut Line' command exists but is not bound out of the box. You can
assign a key binding on the 'Keys' preference page. The command is in
the 'Text Editing' category.

Dani

>
> Ctrl-D works well if you just want the line gone but it does not help
> if you want to paste it somewhere else.
>
> alt-arrows works ok if you are only moving a couple lines away in the
> same editor but it is inconvenient most of the time
>
> I got used to the speed of vi, this is the one feature I miss the most.
> --
>
> As a work-around is there a keyboard shortcut to select the current
> line no matter where you are in it?
>
> My current method is cumbersome:
> 1. press home key
>
> 2. Shift-End
> 3. Ctrl-X
>
> There has to be a better way?
>
> thank you.
>
>
icon14.gif  Re: Keyboard shortcut to cut line [message #1754475 is a reply to message #298653] Sat, 18 February 2017 10:58 Go to previous message
Gaurav Gaur is currently offline Gaurav GaurFriend
Messages: 1
Registered: February 2017
Junior Member
Very nice tip.

It took me a while and googling to find out the "Keys" page. So just adding just in-case someone might need it.

My eclipse version: Eclipse Mars

Go to Menu "Window > Preferences > General > Keys".

Search for "Cut Line" and set binding of your choice. In my case I did "Alt + X".
In drop down for When I chose "In Windows" (which was default)

Paste was already setup.

Previous Topic:Detect missing view
Next Topic:Platform changes not persisted on Mac OS X Sierra 10.12.3
Goto Forum:
  


Current Time: Tue Apr 16 21:07:45 GMT 2024

Powered by FUDForum. Page generated in 0.04074 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top