Turn off auto completion of methods in PyCharm unless and until I select from the auto suggestion tab - autocomplete

When we type a class method name like
def foo(self):
pass
While typing def foo and as soon as we press the '(' (open parenthesis) PyCharm automatically completes def foo( to def foo(self): . How to disable this auto completion in PyCharm?
The checkbox in PyCharm's Settings->Editor->General->Code Completion insert selected suggestion by pressing space, dot, or some other context-dependent keys is unchecked.
Visited previous answers in Stack Overflow and official Jetbrain's post but the mentioned ways doesn't work.
SO link for turning off method auto completions
Jet brains link for turn off 100% of all code auto-formatting.

Related

Is there a way to always stay at the searched-for Symbol location when using vscode and pressing `esc` key?

Let's say I use Go to Symbol in Editor. Let's further say I have a function def run(): (this is Python) that I want to jump to.
If I type #run in the Symbol search dropbox, the viewport will shift to def run in the source code.
So far, so I good. I have found what I want!
At that point, if I press esc I jump back to my starting location, rather than staying at def run() in the source. I have to remember to press Enter to get out of Go to Symbol in Editor... and stay at my location.
How can I make it so esc, by itself, always leaves me where I have found the symbol in the text?
I.e. I want to get more the behavior I get from using Edit, Find where esc leaves at the pattern location. And pressing Enter when in Find mode jumps me to the next pattern hit, if any.
environment: macos, vscode 1.63.2 (latest as of now)
p.s. You also get the same behavior from a Go to Line/Column... dialog, esc will yank you back to your starting point, Enter will leave you at the new location.
I'm afraid it's not currently possible. I've tried to unbind every single keyboard shortcut bound to Escape key so it should basically become a dead key, yet even with this setting symbol suggest highlight were cancelled by pressing the Escape, so no luck.
Unbinding the primary action is normally prerequisite for changing default behaviour -- in your case for mapping it to "accept highlighted symbol" action (which I haven't found either) -- so it seems that Enter/Escape behaviour of symbol palette is not exposed for remapping.

viewing method signatures with parameter highlighting in NetBeans

When the cursor's positioned in the middle of an argument list (making a method call), is there a way to bring up the method's signature with the parameter that that the cursor is on highlighted? Ctrl-space (sort of) brings up the signature, but it includes the huge search list of everything else I can legally type right there, and it's up to me to count through the arguments and the parameters to figure out which one I'm lined up on. (that popup also disappears if I try to move to the next or previous argument).
I've had this struggle with compiled code, and worse with code as I type it in. I typically type the name of the object, then a dot, and then I wait for the signature list to pop up (that filters down as I type). When I see the signature I'm after, I auto-complete with tab or Enter, and then I always end up in a struggle. NB pastes in variable names that are usually about 99% wrong, and I try to navigate the little red, comma-triggered edit boxes, hoping the signature popup will stay in view while I struggle to edit, delete (and stop thinking about) all the (semantic) errors. I usually end up botching it and loose the precious signature window that highlights each parameter as I moved through the argument list.
Any way to get that thing back (with the parameter highlighting)? And/or make the red editing boxes go away? And/or block NB from populating with all the errors?
Super thankful for any help or tips!
Netbeans show popup with method signatures and popup with method documentation only when your cursor is placed at the name of a method. Popup is displayed automatically when writing method name or on demand if you press Ctrl+Space.
When your cursor is placed at the argument list, only parameter names from method signature are displayed in form of a small tooltip. You can force display of this tooltip by Ctrl+P. Unfortunately there is no way how to invoke popup with method documentation in this phase. Instead you will see documentation popups related to arguments which you will type into the method argument list. The only way to display method documentation again is to place the cursor back at the method name and press Ctrl+Space.
When you start writing a method name, popup with method signatures will emerge. When you select one of proposed method signatures by pressing Enter, Netbeans will autocomplete method name as well as its arguments. You find this uncomfortable, because names of autocompleted arguments are usually wrong. You can however easily navigate between autocompleted arguments using Tab and Shift+Tab and overwrite them as you like. Alternatively, you can use Tab instead of Enter when selecting method from method signatures popup. This way Netbeans will autocomplete only the name of the function, not its arguments.
Described Netbeans behavior applies to editing PHP code, and may differ slightly for other languages.

Intellij - navigate to type parameter declaration from symbol

In IntelliJ I can navigate to the type declaration of a symbol using Ctrl+Shift+left click, or Ctrl+Shift+B (see IntelliJ Help).
But suppose I have a symbol of type Option[MyType]. How can I navigate, via a series of keyboard shortcuts and/or mouse clicks, to the class where MyType is declared?
I assume you have this case
val xOpt = someMethodReturningAnOption
and so have nothing to ctrl+click on to navigate to the class. And the short cut you use, takes you to the Option. Which is not that useful.
I don't know if it's possible to do in 1 shortcut in intellij 14. What I tend to do is
step 1: Alt+enter on the variable - select "add type annotation". This converts it to something like this.
val xOpt: Option[String] = someMethodReturningAnOption
Step 2: Ctrl+Click on the String Or whatever it is.
Step 3: Once I'm done, Ctrl+tab to go back to my original class (Or ctrl+shift+backspace to last edited location). And undo (Ctrl+Z :)
Its a bit laborious, so a 1 step shortcut would be great to find out.
(FYI: These are my shortcuts used on my linux box )

Eclipse Content Assist for viewing block declarations from the closing brace?

I'm really curious if anyone knows if Eclipse's Content Assist can be configured to display a code block's declaration by hovering over the block's closing brace (or something similar).
Rather than having to mark long code blocks with a comment, I would much rather hover over the closing brace to view which block it ends.
If what I'm saying isn't clear, imagine you had the code block below:
if (obj instanceof Double)
{
//...PROGRAM LOGIC...
}
In this example, if I were to move the caret to the end brace, right-click the end brace, or simply hover over it. A popup window would show giving me the original declaration at the top:
if (obj instanceof Double) { //...
Also, I'm interested to know if this can be done in Visual Studio; I've asked that question here.
This is nothing to do with content assist.
You can see the block of code as explained below.
Collapse all methods(By pressing Ctrl+Shift+NUM_KEYPAD_DIVIDE. Note you can expand all methods by pressing Ctrl+Shift+NUM_KEYPAD_MULTIPLY)
Hover the mouse cursor towards method collapse icon "+" as shown below.
You will see the content of the method in a popup window. Now press F2 to freez this popup and press ESC to close the popup. Scroll back and forth to see the content. Note that this works for methods, javadocs and import statements only and not for other block statements inside methods and on CLASS body.
Refer How to use Coffee-Bytes code folding for if block folding and try to check the if block content as said above.
Also you can check the scope of block statements by keeping caret after the block start("{") or block end("}") flower brackets and double clicking on it.
See below
You can expand or reduce the block selection by pressing Alt + Shift + Up Arrow and Alt + Shift + Down Arrow respectively and jump to matching bracket(Like "( or )", "{ or }") by keeping caret after the bracket and pressing Ctrl + Shift + P
You mean something like this, when hovering over the closing brace of a code block?
It seems, that this feature has already been implemented and is by default enabled - at least for org.eclipse.jdt.ui_3.9.1.v20140306-2106.
One can enable/disable this text hover (and others) by going to Window/Preferences/Java/Editor/Hovers and selecting the corresponding Source hover. By default the source hover will be activated when pressing "shift" while hovering. When the "Combined Hover" is activated, the source hover should also be automatically be activated without pressing any additional keys.
Note also, that it is quite easy to implement a custom text hover for JDT by writing a plugin and extending the org.eclipse.jdt.ui.javaEditorTextHovers extension point. As an example for how this can be done, have a look at the code of one of the default JDT hovers.

Tab in Emacs-helm (anything) does not autocomplete with current best match

While trying to autocomplete a file (e.g. to open a file with C-x C-f) Emacs-helm shows a list of possible candidates.
If I then press Tab (which I would hope it would help me choose the first/closest match), I get the following in the minibuffer:
It looks like the minibuffer gets confused with escape characters, and it does not choose the file that I actually want to open (the top choice).
Helm requires this conceptual jump from the default Emacs completion, which is not so obvious:
You don't need to press a key to complete. The completion buffer refreshes
with new results after every input.
This is called "incremental" completion.
The normal tab functionality is not needed in "incremental"
completion. So tab was rebound to helm-select-action, which allows you to
choose an alternative action with the selection. But there is only one action
in read-file-name.
The error you're seeing could be clearer though, I've filed this issue on github.
Additionally, note Helm treats each space separated term as a filtering
regular expression. So, pressing space foo will filter
the current list down to those that contain foo in the name.