How can I make SublimeText version 4's autocomplete behave like version 3? - autocomplete

I recently, too-trustingly, upgraded my Sublime Text 3 to Version 4 (Build 4107). Now auto complete behaves completely differently. It now has a pop-up from which I must select a choice - before I would just hit tab and it would choose the best option for me (I could then tab again to try for a better answer).
A concrete example: before, when I typed a word with a typo, for example "questino", I could, with my cursor directly after the o, hit tab and it would correct it to "question" automatically. Now it doesn't do that - now it would pop up a list of any longer words, such as "questions" and "questioned", and then I would have to arrow to one of them and hit enter. It wouldn't even give me "question" as an option - I would have to backspace over the n and then hit tab in order to get a popup that included that word, because not only is the popup annoying, with it requiring multiple additional keystrokes, but autocorrect no longer corrects to a word of the same length as my currently misspelled word, only to longer ones.
There are a lot of options in Preferences, including: auto_complete, auto_complete_size_limit, auto_complete_delay, auto_complete_selector, auto_complete_triggers, auto_complete_commit_on_tab, auto_complete_with_fields, auto_complete_cycle, auto_complete_use_index, auto_complete_use_history, auto_complete_preserve_order, auto_complete_trailing_symbols, and more.
Does anyone know the precise set of preferences to make it behave exactly like it used to? Or maybe there is a package that fixes it? Or maybe my next step will be reverting to the previous version.
Thanks.

The closest you can get right now appears to be:
"auto_complete": false,
"tab_completion": true,
"mini_auto_complete": true,
This is still different from how ST3 works. Tab will fill in only a single value, pressing tab again will not toggle between options, but it won't have the distracting popup.
Background context on the forum. Hopefully this answer will be quickly invalidated by an update or plugin.

Related

How do I select all text in vistual studio code?

In visual studio code (1.29.1) ctrl+a doesn't do anything for me. I checked keyboard shortcuts and it's mapped to a few select all actions (editor.action.selectAll, etc.) but when I'm in a file and press it nothing happens. How do I select all text in the current file in visual studio code?
Thanks for the comments, it make me realize it must be an environmental issue. Turns out if you have any mapping starting with a key combination that will lock that mapping to the key combo and you can't use it for anything else.
To make save all ctrl+shift+s I had to re-map save as and I mapped it to ctrl+a+s, so everytime I hit ctrl+a it just waiting for second key. In the status bar at the bottom of my editor it said something like "Ctrl+a detected, waiting for second keystroke", which means Ctrl+a won't work on its own. I re-mapped Save As to some unused key combo and it fixed select all.
This question was luckily answered on another thread
I'll post the OG answer here, nonetheless.
Most new comers to VS-Code could resolve this issue with the 2nd method provided by the OG answer:
Goto File > Preferences > Keyboard Shortcuts
in the search bar type this Select All
There's should a couple of results, you'll obviously want the "Select All" result
right click on his line and click on Change When Expression
a textbox would be highlight for you to fill in text. type editorFocus
press enter and done!
The OG answer provides image if you need to confirm that you're doing it right.
side-note: This issue bugged for more than 3 years and is the main reason my I used VS-Community over VS-Code.
So it's nice to finally be able to work normally in this very robust customizable IDE text-editor.

How do you make Eclipse not edit all the occurrences found by "Find Next"?

When I use Cmd+K to go to the next occurrence of the selected word, Eclipse leaves behind these red "cursors" right before the copies of the word that I navigate through. If I then edit the last occurrence that I find, Eclipse "helpfully" edits all the occurrences that I've navigated through in the same way. This leaves corruption in parts of my file that I'm not currently looking at, which is really infuriating.
I want to disable this "feature", but I haven't got a clue what to call it, so I don't know how to find the setting that turns it off. Searching the Eclipse preferences for "occurrence" only gives various versions of "Mark Occurrences" for each editor plugin, which doesn't disable this behavior when unchecked.
EDIT: Here's a video displaying the behavior I'm talking about: https://youtu.be/8xeKRLyGSLg
This isn't really given by PyDev, it's a feature added by LiClipse (http://www.liclipse.com/multi_edition_video.html).
After the link is done with Ctrl+K, you can press ESC to remove those links if you don't want the multi-edition to happen (so that when you edit one occurrence you don't edit the others).
I must say this is the first request to have that turned off... I'm pretty certain as I just took a look and there's no setting to do that -- so, unfortunately, until the next release, you have to either live with it, remembering to press ESC if you don't want the multi edition to happen or use a plain Eclipse install with PyDev, but you'd also be without other LiClipse benefits, such as textmate bundles, vertical indent guides, theming integration, etc.
Still, note that ideally, I'd say you should get used to it as it can be a real time-saver -- although I'll implement the setting to turn it off for the next release anyways, as it's something that should really be there ;)

xcode 5: What's the best way to go back and forth between top of editor and where you were before?

So I've had this question for a really long time. Say:
You're working on line 1000 in the primary editor of xcode,
Then you realize you need to use class ABC but it's not imported. You go to the top of editor and write a line such as import "abc.h"
Then you want to go back to line 1000 and continue your work.
For now I've always need to use my scroll bar to scroll back and forth between line 1 and line 1000, which can easily get me lost. I know that in Eclipse+FDT you can do auto import (ctrl+1 to auto import a class), is there similar feature for xcode? If not, what's the best solution? Thanks in advance.
You can jump between line numbers by typing command + l.
You can navigate to the top of the editor by pressing command-upArrow.
Then to "go back" to line 1000 (where you were), you can press control-command-leftArrow.
Edit: Looks like Xcode does have a "Jump to Line" feature I was unaware of, as per Jonah's answer. You can definitely use that to do what you're looking for.
Xcode has no auto-import feature, nor does it have a feature to jump to a specific line, unfortunately. That may get added in a future release, but I wouldn't bank on it.
Your best bet is getting creative with Xcode's snippet features and its "Jump to Next Placeholder" command — you can create "marks" in your code with snippets and placeholders, jump to the top of the files to add imports, and jump back to your "marks" to keep coding. Create a new snippet that just contains a completion placeholder:
Type <#Mark#> into any text editing application (or even a file in Xcode) and drag the text into the Snippets pane in the right sidebar. This will create a new snippet with just a placeholder called "Mark".
Double-click the snippet to edit its information, changing its Completion Scope to "All".
Give it a completion binding (like "mark") that you'll remember to use.
Then you can create a marker whenever you want (typing "mark", then hitting tab), jump to the top of the file to add an import, and use "Jump to Next Placeholder" (^/ by default) to go back to the placeholder. You can then delete it and keep coding.
Alternatively, if you know vim keybindings and that seems too complicated, you may have some luck with the XVim plugin for Xcode that brings some vim features to its editor. Keep in mind that Xcode plugins are not officially supported, so unofficial support can be taken away at any time.

Validate Autocomplete in Eclipse

Coming from Visual Studio and starting a project in Java, I realized I couldn't cope with having to press ctrl+space to have the autocomplete panel show up. An easy workaround was to set all keyboard characters to be trigger characters for autocompletion.
My only problem is that, when presented with autocomplete suggestions, a single press on the space bar will write the first proposition. In situations where I'm happy with the suggestions, that's just fine. In situations where I actually want to use what I wrote down initially, I have to press 'escape' first to remove the autocomplete panel before I can press 'space' safely.
Netbeans doesn't use the space bar as a validating key for autocompletion (only 'enter' does that) and I like that behavior. Any way to replicate it in Eclipse?
Thanks in advance for your answers!
EDIT: I should have mentioned I'm using Eclipse on the Mac.
Guillaume
I have the same problem with Eclipse Indigo on Windows XP actually. Coming from intellij idea, I also felt the need to set the whole keyboard to trigger auto-complete.
A quick proof that SPACE key does accept suggestions : type inte on a new line. If the auto-complete menu shows, press SPACE. It goes for Integer.
If anyone knows how to set the SPACE key to "ignore suggestions", it would be great, because the escape key on my keyboard is also too far away :)
Thanks
Edit : actually the best would be to have only the ENTER key validating, because ';' and '(' also seem to validate
I just tried to reproduce your behavior, but couldn't. Here is the configuration I have (and the steps I have done to reproduce):
I have installed Indigo (current version of Eclipse, version number 3.7).
I did not change any configuration there, this is what is the default:
Under Window > Preferences > Java > Editor > Content Assist, I have the following settings:
Completion inserts (instead of overwrite)
Insert single proposal automatically (which is ok most of the time)
not insert common prefix automatically
I have a simple class, go down to a method, and do the following steps:
Enter this.no and wait some time. Sometimes I have to press CTRL + SPACE, sometimes not.
Proposal pops up which includes notify and notifyAll.
I press SPACE and a space is inserted in the text, the autocomplete suggestions are closed without inserting anything.
I do not know if older versions of eclipse have the same behavior.

Is it possible to work in Eclipse with keyboard only?

as most of us surely do every now and then, I try to improve my workflow. As Eclipse is my main IDE, I wondered if it may be possible to use it without mouse. I browsed the available shortcuts and tried to use them instead of my mouse. I found interesting features like Ctrl+3 which opens something like the Apple spotlight.
I know there are a lot of questions concerning favorite shortcuts etc. but I'd like to know if it works because at the moment it feels a bit squishy 100% without mouse.
So is anyone out there using Eclipse like that? And are there some hints to ease the change?
Yes, it is possible. For a start, check out 10 Eclipse navigation shortcuts every java programmer should know. When you use these 10 shortcuts and some of the shortcuts of the comments, you will already see a big performance boost.
The "open type" and "open resource" dialogs are CamelCase-sensitive, so when typing "NPE" in the open type dialog, I get two matching items NoPermissionException and NullPointerException. So using good names with consistent spelling is a must.
Ctrl+F11 starts a program, F11 debugs it. Note howewer to check if in Window-Preferences-Run/Debug-Launching the value of "Launch Operation" is set to your needs.
You may want to customize the search dialog (Ctrl+h) to only show the file search (default is to context sensitively present you with different search tabs).
Ctrl+n allows you to create something new (opens a wizard with an initial filter text to filter the possible next pages).
I'm a blind programmer who uses eclipse. While there are plenty of shortcuts I find people often overlook using menus from the keyboard. If there's a function you use a lot that doesn't appear to be supported with keyboard shortcuts you can either create a shortcut to it in prefferences or use keyboard shortcuts such as alt+f to access the file menu and a one letter combination that allows you to access the item. For example hit alt+f then a to access the save as dialog. The underlined letter is the one you want to hit once in the menu.
There are a couple of things you can do to improve your keyboard:mouse usage ratio with Eclipse.
First off, if you push Ctrl-Shift-L, it shows you a master list of all the shortcuts you can use. If you know what you want to do, this is usually a quicker way of doing it without having to dig through menus, and as a bonus, you will learn some shortcuts you didn't know before.
The other thing you can try is a plugin called MouseFeed which looks promising. It tells you the shortcut for any menu item you use and if there isn't one, reminds you to create one. It essentially acts as training wheels until you become as close to 100% keyboard use as possible. I'm not sure how well it works in 3.4, but you can give it a shot.
Hope that helps.
Here you get an Eclipse Shortcut Overview PDF file of all key bindings. This file you can print and put beside your keyboard if you wish.