Sublime Text autocomplete left column keyboard shortcut - autocomplete

The list of Sublime Text autocompletions can have two columns. If I press tab to select an autocompletion, it always uses the right column. What if I want to autocomplete using the left column?
This question is not language specific, but for example if I type "B2J" I get the suggestion "B2JointDef - box2D.dynamics.joints.B2JointDef". It's what I want, but I already imported "box2D.dynamics.joints.*" so I just need "B2JointDef". However if I press tab or enter, I get the whole "box2D.dynamics.joints.B2JointDef".
Do I need to use a more intelligent autocomplete package, or is there some way to get the left column?

Use SublimeJEDI. It should know that you have imported the package

Related

Problems with selecting entire text in VS.Code

You may know that when you select your code by default in the VS-Code, the cursor itself selects anything since you stay in the same column of a "code's paragraph". However, this is not the case, some time ago I installed VIM extension and since that moment when I have to select a entire paragraph I have to move the cursor until the end of a line to select that because shortcuts doesn't work to do that.
This is the example of what I'm talking about(I stayed at a code's part but in the same column so I select that with the intention to select the entire paragraph, so this is the result):
Selection with no "alt" shortcut
I need help to solve this problem since I've proven the settings of the IDE and even reinstall the extensions, so I'd be so granted for your help, Thx!.
Uncheck:
On the menu bar, Selection -> Column Selection Mode

VSCode: How to split editor using same shortkeys as Sublime Text

In Sublime Text I can use the following shortkeys:
ALT+SHIFT+2 : create two columns
ALT+SHIFT+3 : create three columns
...
I want to be able to do the exact same thing in VSCode (without downloading the Sublime Text keybinding since I want the rest to stay the same)
If you search for columns within the "Keyboard Shortcuts" editor, you wil see these options:
workbench.action.editorLayoutTwoColumns
workbench.action.editorLayoutThreeColumns
They are unbound to any keyboard shortcut by default. Click the plus sign to the left of each of these commands in turn and you will get a dialog box where you can enter your chosen keybinding for each and you are done.

eclipse multiple text selection like sublime text 2

is there an option or plugin for eclipse which would enable multiple simultaneous selections in the same editor.
In sublime text, selecting some text and then pressing Ctrl+d will add next instance of the same text to the selection if possible. After selecting the instances needed the editor has multiple carrets (not necessarily on the same or adjacent columns and rows). In this mode it is possible to move all cursors forward or back simultaneously and to edit all instances of text simuntaneously.
I find this feature very usefull and miss it sorely in eclipse..
This Eclipse plugin attempts to provide this feature: https://github.com/caspark/eclipse-multicursor. From the README:
What is this?
A work-in-progress attempt to provide Sublime-Text-like
multi cursor support for text editors in the Eclipse IDE.
What works?
Multiple identical lines can be edited simultaneously using Eclipse
linked mode editing (similar to existing "rename in file"
functionality)
Next steps
"select next" functionality + associated editing using Eclipse linked
mode
"find next" + associated editing
editing of non-identical text / editing without using linked mode
split selection to lines
regexp support for find next
This feature is available in LiClipse.
See it in action (more towards the end of the video).
It supports linking with Ctrl+K, unlink with Shift+Alt+K, Ctrl+Alt+mouse double click to select words or Ctrl+Alt+Mouse to make a selection of a region (or just end lines).
Preferences>General>keys>Rename - refactoring
I changed the binding to command + shift + R when > Editing Text.
Sorry for bringing up an old question, stumbled upon it after searching google for the problem
Alt + Shift + A, then you can hold shift and use the cursor in multiple lines.
Like Ctrl+D I could not find, but like Alt+F3 in sublime (multiselects all matches), you can do by pressing Alt+Shift+R, or select text > right click > refactor > rename.
Must say that this does not work with any kind of text. It works with names of variables, functions, classes etc.
Tested on Eclipse 3.8.1
ALT + SHIFT + F worked for me.
You can see shortcuts for all here:
Goto -> Window -> Preferences -> General -> Keys and search for replace then you will see binding for Find and replace. In the bottom of that window, you can add your key to Binding text box. There you can add or edit any keys as shortcut.
If you want to replace selected word's matching words or find selected words, use below keys because you do not need to select all words in eclipse:
Ctrl+F gives me Find/Replace dialog box.
Or you can,
First Alt+A
Next Alt+F
Then press on Replace or Search button occurding to your need.

How to do multiple line editing?

I want to edit multiple lines in eclipse, but I can't find any short cut or Plugin. In Geany I just press ctrl+alt+up/down I can add / edit multiple lines.
Maybe this example can explain what I mean:
var text = "myname";
var addr = "myaddr";
var age = "myage";
I want to edit text above into:
var my_text = "myname";
var my_addr = "myaddr";
var my_age = "myage";
The text above is just a simple example, but sometimes I have many lines of words that I have to edit its prefix.
Press alt + shift + A to Toggle block selection (Toggle block / column selection in the current text editor), this will let you write vertically in eclipse, then you can easily do this.
Go to Window->Preferences.
Find for binding in text box surrounded by red box.
On OS X, the key combination for multi-line edits in Eclipse (or STS) is option/alt+command+A
You can try the following plugin,
https://github.com/caspark/eclipse-multicursor/releases
With this multiple occurrence of same text can be selected and edited. This is similar to multi select functionality available in editors like Sublime and Visual studio code.
The Eclipse 4.24 (June 15 2022) will integrate it (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=576377):
Multi selection down relative to anchor selection (e.g. Ctrl-Alt-J)
Multi selection up relative to anchor selection (e.g. Alt-J)
End multi-selection (e.g. ESC)
Add all matches to multi-selection (e.g. Ctrl-Shift-Alt-J)
Multi caret up (e.g. Ctrl-Alt-Shift-Up)
Multi caret down (e.g. Ctrl-Alt-Shift-Down)
Thanks to eclipse contributor !
The Eclipse 4.22 (Q4 2021) equivalent of Geany would Alt+Click on the lines you want to edit in one go.
Eclipse now supports
Multiple text selection
Support for multiple selection has been added to Text Editors.
Multi selections allow most edit operations (text replacement or insertion, extend selection to next word or to next line, copy/paste...) to apply simultaneously on all ranges.
Multiple strategies are available to enable multi-selections:
Turn a block selection into a multi-selection using the To multi-selection command,
Add a caret with Alt+Click,
Use the new Select All button on the Find/Replace dialog.
So check if this would work in your case.
I know this is an old post, but I still want to share my way of multi select and editing. However this way is restricted to only the same variables across the file. Simply highlight the variable to edit, right click, choose Refactor->Rename. Then edit the variable and it will also edit the same variables across the file. Hope it helps..:)
Press key - { Alt + Shift + A } You will see A [+] symbol in IDE then use this symbol as drag

Is there an Eclipse command to surround the current selection with parentheses?

Is there an Eclipse command to surround the current selection with parentheses?
Creating a template is a decent workaround; it doesn't work with the "Surround With" functionality, because I want to parenthesize an expression, not an entire line, and that requires ${word_selection} rather than ${line_selection}.
Is there a way that I can bind a keyboard shortcut to this particular template? Ctrl-space Ctrl-space arrow arrow arrow isn't as slick as I'd hoped for.
Maybe not the correct answer, but at least a workaround:
define a Java template with the name "parenthesis" (or "pa") with the following :
(${word_selection})${cursor}
once the word is selected, ctrl-space + p + use the arrow keys to select the template
I used this technique for boxing primary types in JDK 1.4.2 and it saves quite a lot of typing.
Easy, Window->Prefs, then select Java->Editor->Templates
Create a new template with : (${line_selection}${cursor})
The "line_selection" means you have to select more than one line.
You can try creating another one with "word_selection", too.
Then, select text, right click, Surround With... and choose your new template.