is an advanced Python completion possible with Sublime Text 3? - autocomplete

I would like to have a completion in Sublime Text 3, for Python code documents, that would:
Complete the actual object method and other properties (like e.g.: os.path.isd → os.path.isdir without any previous occurence of the word isdir in the document).
Complete the general set of all document's words with a second, lower priority ↔ i.e.: have them listed them after the actual methods.
I would also like to see ST letting the words appearing nearier from the completion point to appear higher in the completion popup window.
Basically, I would like to have a completion resembling the Vim's CoC for C++ in its general features.
Is this possible? If yes, then what should be done to configure Sublime Text 3 for such coimpletion?
The behavior after installing the Python Completions package is far from perfect — all it does is apparently changing the priorities of the basic completion sources (after adding some that i didn't identify), so that it's worse than the shipped original' completion.

The Anaconda package (not at all related to the Anaconda Python distribution) does most of what you're looking for. You may also want to take a look at the LSP package as well.

It's upto you.
You can choose any plugin you like and your computer can support.
Just search the internet about the best python auto-complete.If you feel one of them is best suited for you, search in the package discoverer of Sublime Text for that name. If there is a plugin, install it or read the instructions,etc.
But I heard of some like Kite and Jedi.

Related

How do I run an external command on the current selection in VS Code?

I'm currently switching editors from Vim to VS Code. One feature I like in vim is the ability to run an external command on a region of text (the :! command). I've been unable to find an obvious equivalent in VS Code.
Is this feature available in VS Code? Or is there an extension that provides it?
(As a more general question, what's the best way of finding out things like this? Is there a website or anything that describes how to do common tasks from other editors in VS Code?)
For the record, VSCodeVim allows you to do the same thing.
Having searched some more (the key term is "filter the selection") I found the Filter Text extension, which does exactly what I want.

Triggering autocomplete in emacs-prelude

I installed emacs prelude in cygwin via the simple curl installation. I open a test.js file and try typing "document." to see autocomplete but nothing pops up. Admittedly I'm totally an emacs/prelude newbie, is there something else I should be doing to get it to autocomplete?
Does your Prelude installation include library Autocomplete? And is that what you mean by "autocomplete"?
Give a recipe showing what keys you hit and what you expected to happen vs what actually happened.
Consult the Prelude manual.
Ask the preluddites themselves (sorry; couldn't resist): emacs-prelude#googlegroups.com.
I see only a few Google hits in English for all three keywords: "emacs prelude autocomplete", and none of them mention using Prelude and Autocomplete together.
Your question is too general, I am assuming by auto-completion you mean
A popup that displays the possible completions for currently typed
word and allows you select one of the candidates
Something like this
Last time I checked prelude did not come with such autocomplete but you can configure emacs to have this kind of completions. You will have to install a library that provides the completion UI, I know of three libraries that do this in emacs (ordered according to my familiarity with them)
1) auto-complete
2) company
3) completion-ui
You can install any one of these (auto-complete and company have a good a number of backends, I do not know much about completion-ui). If you are using emacs 24 this will be as simple as M-xlist-packagesRET, marking the package to be installed with I and then typing X (for auto-complete you will need to add melpa to your package archive, refer to the websites above for more on installation)
These will provide a basic completion interface. auto-complete by default offers words in current buffer for auto-completion. However for 'intelligent' auto-completion you will need to configure these to use a completion backend. This will vary according to the individual language you want completion (eg. jedi for python, tern for javascript, eclim for java etc), as such you will need to ask specific questions to get helpful answers.

How to create a Notepad++ macro to run multiple plugins automatically?

I am using Notepad++ for different languages i.e: JAVA, C, C++. For each of these languages I have installed plugins to make coding easier in Notepad++.
The problem is that every time I start Notepad++ I have to go and run all those plugins manually. I tried recording a macro so that it will perform all these actions by one click but it didn't record anything I did with the plugins. The macro will record any changes I bring to the code or if I save the code to some other location but it won't record the actions performed by the plugins.
Can anyone guide me to a solutions.
Thank you in advance.
Have a look at AutoHotKey tool. It can send keystrokes/mouseclicks to Notepad++ so you can easily combine invoking many menu items into one command. (And much more like work with clipboard, ask for values in input boxes, run apps or DLL's.) Please see AutoHotKey usage with Notepad++ in this answer.

eclipse's plugin or vim's plugin similar like ctrl+p and type # to find function/method list in sublime

eclipse is good at autocompletion when static typing , when is dynamic typing ,eclipse failed to autocompletion ; in sublime ctrl+p ,type # and type 'method name'to find function/method list , It is a wonderful way to find the right method while coding dynamic typing language ;
the key point is :
the operation in sublime text 2 is very convenient ,all key type is in one input box ; never need to chage active file tab; we can focus on the active code file tab ;
is there any plugin in eclipse or vim which can search method of any file conveniently ?
In ST2, this feature is used to quickly jump to a method anywhere in your project.
In Eclipse, Control+Shift+R can be used to jump quickly to a "resource" (file) and Control+Shift+T is for jumping to a type (not method). Control+o opens a very useful and quick outline of the current file. It doesn't work project-wide.
I'm not aware of something that works exactly like ST2's feature. Did you search the marketplace?
In Vim, FuzzyFinder, Command-T and CtrlP all allow you to navigate through your project using fuzzy matching. They can be setup to use your tags file. AFAIK, there's no plugin that provides exactly what ST2 provides.
From your question I'm not sure you use it as intended: it sounds like you use it to show a list of methods in some file in your project in order to use the right method in your code. This sounds a lot like you'd benefit from autocompletion to me.
Being an IDE, Eclipse shines on that front: its "code assist" window will show you where the suggestion is defined as well as its type.
Vim's "omnicompletion" is quite limited compared to an IDE but, depending on your language and using some third party scripts, it can be made quite powerful.

how to write notepad++ auto-complete plugin

I'm trying to develop a small plugin that will do a sort-of auto-completion along with some other advanced features in order to create a primitive IDE to use with a custom scripting language we've developed.
So I want to know, how do the auto-complete plugins usually work? I have a basic plugin template that I'm playing around with (the C# one) and I see how the commands work, from a high level anyway, but I'm trying to figure out how I would create my auto-complete feature.
My first guess would be to make a command that spawned a new thread that retrieved the entire contents of the notepad++ text every 100 mills or so and then popped-up a little selector box or directly wrote the auto-complete possibilities when the correct pattern was matched on the newly typed text.
Any wisdom from those who have gone before me on this?
Thanks alot.
Well I figured it out. Apparently there is a "beNotified" method in my project template that I downloaded and it handles all events/notifications from the Scintilla/Notepad++ environment. I will probably be using the SCN_CHARADDED event to check the current line of text each time a character is added to the GUI.