I find it useful to be able to create an empty new line after current line. End Enter does exactly what I want, but it is not easy to type. Something closer to default keyboard row, like Ctrl+o, would be much better. Can I do this using default Eclipse commands, or is there any plugin providing such functionality?
Shift-Enter inserts a line below the cursor and Ctrl-Shift-Enter inserts above.
Every-time you save a Scala Worksheet in the Scala IDE, the output of each expression is printed as comments on the right-hand side of the editor. Is there a way to clear this output from a Scala Worksheet so that you can cut and paste code?
Currently, my solution is to save my worksheet with an error, so that the output would disappear. There must be a better way... a keyboard shortcut or something.
There is no such feature yet. There is a related ticket: The Format action should strip comments.
While waiting for the ticket to be resolved, this regular expression can be used in Find/Replace (Ctrl/Cmd+F) to delete the comments.
*//[>|].*$
Update:
This has been fixed: #132
It's jerry-rigged, but gets the job done.
Make a small edit (e.g. delete a space where it doesn't matter) to prompt a save.
Save.
Press Esc immediately to terminate worksheet process.
You now have a clean worksheet!
Ctrl+Shift+C does the job in Scala IDE 4.7.0
Alt+Shift+A enables Block selection mode. You will be able to select only left part of screen (columns with code). Block mode also makes possible to select only columns with output.
More on block selection mode
I recently switched from Eclipse to IntelliJ IDEA, and found myself wondering how to move the cursor out of a pair of auto-completed brackets.
In Eclipse after I finished typing in a pair of brackets, pressing tab brings me out of the brackets. How can I do the same thing without using the arrow keys?
Many thanks for your help!
IDEA doesn't have such feature yet. The closest equivalent is the Complete Current Statement editor action (Ctrl+Shift+Enter).
UPDATE
Initial implementation for this feature is available in 2018.2 EAP version - press Tab to jump out.
It works more like in MS Visual Studio - without visual indication of tab 'exit' position. For now, it should work in Java, SQL, Python and some other files. It will take some time for other languages to catch up - some language-specific code changes are required.
The feature is disabled by default, you can enable it in
Settings -> Editor -> General -> Smart Keys -> Jump outside closing
bracket/quote with Tab
Ctrl + Shift + Enter does not seem to work for me in IDEA 12.1.4, but I found the closest feature to what I was looking for was Shift + Enter. This completes the line, creates a new line below the current line and moves the cursor to it.
You can do this by pressing the closing symbol that you would've pressed otherwise, but was auto completed. For example, if you have just typed the f below, you would press shift and 0 (or closing parenthesis), and it will move your cursor outside of the parenthesis.
String asdf = "hello world";
System.out.println(asdf);
I went to preferences->Keymap and set a shortcut for "Move Caret to Line End" to Shift-Space. It takes me to the end of the current line I am on without adding anything, if that's what you want.
Not currently supported by Intellij. There is an open feature request on this at http://youtrack.jetbrains.com/issue/IDEA-74666. Extra votes would be nice.
Intellij supports the ctrl+shift+m shortcut that jumps to the end of the block:
https://www.jetbrains.com/help/idea/2016.2/navigating-to-braces.html
It's not quite what you're looking for, but you can type the character you are trying to move outside of (a closing paren, for example) and that should pop you outside of the auto-completed character.
Not ideal, but functional as far as I've tested it.
I set these setting:
1) I added Semicolon shortcut to Complete Current Statement:
Instead of using for loop command, I using fori command (because for command needs semicolon character):
2) I added Alt+Semicolon shortcut to Move Caret to Code Block End:
So when I inside the loop, by pressing Alt+Semicolon jumping end of the bracket, by pressing Semicolon I jumping out the bracket subsequently.
by adding these shortcuts, the speed of coding will be faster.
Such key is called "End".
You can assign any unused shortcut to "Move Caret to Line End" action in "Settings/Preferences | Keymap".
P.S. You can use Ctrl+Shift+Enter to complete your statement (in your case it will place caret at the end of line and will add ";" there) -- action called "Complete Current Statement" and shortcut can be checked/changed in a same way as described earlier.
If you decide to move back to Eclipse and use PyDev this feature by default is disabled, First Switch to PyDev Perspective and you can enable it by going under Preferences>PyDev>Editor>Typing>Enable link on Automatic parenthesis or literals closing
Collapsing code sections is nice. But everytime I select the collapsed part in the editor and cut/delete it the selection expands and I have to find the start/end manually in the expanded code.
Is there an easier way?
Many thanks!
When your cursor is inside the element you can use Select Enclosing Element Shift+Alt+Up. You may need to press it a few times, depending how many levels of enclosing elements there are (blocks like loops).
You may use a desktop environment that thinks it is a good idea to define a few hundred shortcuts that you will never use but that override all your application shortcuts (Ubuntu Unity). In this case you may need to change your desktop environment (by far the most painless way to solve this problem).
Using Neon
Collapse the code
Double click the collapsed code
Hit ctrl-x or the Delete key.
Hitting Backspace or the Enter key still just expands the collapsed code
I started using SuperTab recently, but I want to use Ctrl-space instead of Tab.
My problem is that I often use Tab to add indentation inside comments, but SuperTab starts completion. I know I can use Ctrl-V Tab, but that's clumsy (especially since I don't use Tab for completion).
I tried adding this in my vimrc...
let g:SuperTabMappingForward = '<c-space>'
let g:SuperTabMappingBackward = '<s-c-space>'
...and that allows me to use C-space, but Tab still does autocomplete. I want to use Tab to insert indentation and never completion.
I'm using SuperTab continued.
I started using SuperTab because I want context-sensitive completion with Eclim (Eclipse + Vim). I set this:
let g:SuperTabDefaultCompletionType = 'context'
And SuperTab switches between text completion and user-defined (eclim) completion (for member functions and variables) as appropriate. If there's a simpler way to do this, then that would be an acceptable solution.
Judging strictly from the documentation, you may be able to get this effect by also setting g:SuperTabMappingTabLiteral to <Tab>.
Edit: I was able to test this in gvim this morning with positive results. Setting this setting in conjunction with the two mentioned in your post allowed me to insert literal tab characters with <Tab> and do completion with <C-space>.
Had the same problem...
After looking in the documentation, it appears that <C-Tab> is what you're looking for.