Eclipse: Text Editing Without Mouse - eclipse

I have bandage due to 5th metacarpal damage. Typing is no issue at all, I do hours of it and it's fine. Using a mouse... impossible. This is not about being a productivity ninja not losing the time it takes to reach for the trackpad or the mouse... it's actual being able to do some stuff or not at all for the moment. Anyway, here's the question, put simply and clearly:
In an Eclipse editor, can I move around using the keyboard only?
Examples of actual things I would like to be able to do without using a mouse:
Move the cursor to the end of the line
Move the cursor to the beginning of the line
Move the cursor one line down
Move the cursor one line up
Move the cursor one column left
Move the cursor one column right
Move the cursor one word left
Move the cursor one work right
Move the cursor to the end of the word
Move the cursor to the beginning of the word
Delete the character to the left of the cursor
Delete the character to the right of the cursor
etc.
I realise some of this is possible already using a mixture of END, HOME, CTRL/ALT + ARROW_KEY, etc. But it's not as comprehensive as, say, E-Macs or Vim.
As simple as that.
In Vim, I use j,k,h,l... in Xcode I use Emacs bindings (CTRL-N, CTRL-P, CTRL-H)... how can I use Eclipse in a similar way? I have heard of a "vim" plug-in but I really just need the cursor movement, that's it. Nothing else.
Should I just create custom shortcuts for each movement?!

Going to the end of the line: End key
Going to the start of the line: Home key
Going one line down: down arrow key
Move the cursor one line up: up arrow key
Move the cursor one column left: don't know what you mean by column
Move the cursor one column right: idem
Move the cursor one word left: ctrl - left arrow key
Move the cursor one word right: ctrl - right arrow key
Move the cursor to the end of the word: no idea
Move the cursor to the beginning of the word: ctrl - left arrow key
Delete the character to the left of the cursor: backspace
Delete the character to the right of the cursor: delete
This is on Windows. All the shortcuts are available in Window (Alt W) - Preferences (P) - General - Keys (type "Keys" in the filter text box). Most of the shortcuts above are standard shortcuts, which are used in every windows editor.

I found it :(
Preferences > General > Keys > Emacs

You can do almost everything with your keyboard:
Take a look here for a detailed list of shortcuts:
http://www.shortcutworld.com/en/win/Eclipse.html

Related

How to move the cursor into empty space? Virtual space?

I use Microsoft visual studio code.
I am moving the cursor by pressing the arrow keys, but when I try to move it down at the end of a line, it moves to the beginning of the next line.
What I want is for the cursor to move to the same position on the next line.
Is there any way to achieve this?
Since vscode does not support the concept of "virtual spaces" there is no built-in way to do it. I found one extension that does do it though:
fake-virtual-space
There are some limitations but it does do what you want. In the demo below I am only using the up and down arrow keys to move the cursor to a new, previously empty, line.

VSCode move selection of multiple lines up and down

I am trying to get used to VSCode because of dendron and I am friend of learning defaults because I work on too many installs to maintain custom settings.
Is there any equivalent in VSCode to sublime text multiline movement?
I have attached a GIF to show what I mean because I can't seem to find the right google keywords or everyone else means something else than me with saying move multiple cursor lines vertically.
In ST I can move them after selecting them with a cursor via SHIFT + CTRL + Up/Down
GIF of st3 multi line movement
EDIT: Found it. Sublime Text 3 can move blocks by cursor, vscode can't. It only moves by selection. Which ironically work with a single line cursor though.
Select all lines which you want to move up/down then Alt + (arrow key up/ arrow key down ) to move your piece of code up or down.

How to autocomplete curly braces and move cursor into it automatically in Eclipse?

I am new into Eclipse. I found that when I type Ctrl + ( it will also generate ) automatically, and move the cursor into this pair at the same time. After I finish editing coding in the pair, the cursor will jump out the parentheses automatically when typing Ctrl + ).
It's very convenient because I don't need to take a long distance movement to operate the arrow keys with my right hand every time. I also found [] also has this functionality. Unfortunately, I still don't find any combine-keys with {} to perform this functionally. Does anyone know about it?
First, look on Eclipse jump to closing brace.
Open in Eclipse Preferences from menu Window.
Navigate on left side to Java - Editor - Typing.
There is the option {Braces} in the group Automatically close. Check this option.
Also in Preferences navigate to General - Keys.
There is in the list the command Go to Matching Bracket with Editing Java Source in column When. You can redefine the key binding of this command.

Eclipse shortcut for scroll line + cursor down

When navigating in Eclipse editor I use two possibilities to scroll text:
Shortcut "Ctrl + cursor down" (keyboard arrow key) -> scroll lines, but the cursor stays at same line
"Cursor down" with the keyboards arrow keys -> cursor moves to last line of visible editor, then the text starts scrolling
Is there a combination of both? I use Ctrl + cursor down extensively for good overview, but when I find the line to edit, I have to set the cursor to the line again (with the mouse).
I have created an Eclipse plug-in which adds a command for this.
It is named Laid Editor Utilities and can be installed from the plug-in update site:
https://bitbucket.org/lii/laid_language_tools/src/master/se.lidestrom.laid.update_site/
The command is named Scroll With Caret Line Up / Down. By default it has the keyboard shortcuts Ctrl + Alt + C U/D (it's best to to change this to something more convenient).
The plugin also contains some other new editor actions, see project page for more information.
IMHO there is no such short cut. In fact how editor should know which line you want to edit while scrolling, is it the first visible line or the last or in between?
Closely you can use the short cut key Ctrl + L to jump to a given line, as you aleady holding the Ctrl key while scrolling, just press L and type the line number you want to be in and press OK. Then the caret will be placed on the line you want to edit.

How to navigate to the last cursor position in Eclipse?

Recently, I switched from Visual Studio to Eclipse. Now I am missing the shortcut for navigating to the last cursor position in Eclipse. In Visual Studio, the same can be done with the help of the Ctrl + - shortcut.
How do I do this in Eclipse?
Go to Preferences / General / Keys. You'll be able to see or edit the bindings for:
Backward History: default is Alt←
Forward History: default is Alt→
You may also use those shortcuts (and see the key bindings) in the toolbar:
There is Altleft arrow and Altright arrow to navigate to previous/next cursor positions, and CtrlQ to go to the last edited position.
I'm adding an answer, because I'm not allowed to comment yet. Though the dystroy's answer contains information about useful shortcuts, I'm not satisfied with it, because the mentioned Alt+left shortcut doesn't always navigate to the last cursor position (e.g. in the same file). I'm not sure how it works in Visual Studio, but in IntelliJ a similar shortcut always moved the cursor to the last cursor position, even in the same file. I would like to have such functionality also in Eclipse. For example: I move the cursor using the keyboard's down arrow key successively on lines 10, 20, 30. Now I am on line 30 and when I press Alt+left I would like the cursor to go to the line 20. After pressing Alt+left again I would like the cursor to go to line 10.
In Eclipse, when the cursor was in file A and I opened file B and moved the cursor down a few lines in file B, then Alt+left will move the cursor to the file A, instead of moving it to a previous cursor position in file B.
I created a separate question for this problem:
How to navigate to the last cursor position in Eclipse if it is in the same file and was not edited?
In Mac (OSX), the commands are ⌘[ and ⌘]. They are very convenient navigation commands when coding.