Notepad++ intellisense for user-defined functions - autocomplete

I understand that I can enable auto-completion in Notepad++ by going to "Settings -> Preferences -> Backup/Auto-completion". For example with Python, the auto-completion only works for a set of pre-defined functions according to this link.
Does anyone know how to make intellisense in Notepad++ for the functions and methods that I define? I'm no expert in this but I was thinking, surely there must be a way that Notepad++ can automatically detect function definition in the code, and add those functions to its intellisense database or something?

You may be interested in the relative documentation.
Have a look at the files in %ProgramFiles%\Notepad++\plugins\APIs.

Related

VSCode inserts space after comment sequence

Whenever VSCode formats code, for almost all languages, it will insert spaces after the comment escape sequence (//, #, et cetera).
Although this does not work for C code, I assume that this might be some kind of global setting.
Is it possible to disable the insertion of this extra space somewhere? I follow a style where I don't use the extra spaces after "code-only" comments.
Any (lightweight) extensions that do this (or similar)? Should I make my own...?
I'd like for this solution to work for all languages, although Java is what I use the most.
I tried searching for some extensions related to comments, but it seems that there are none doing this. Is a linter what I need..?
Sorry and thank you in advance!
VS Code doesn't have a default formatter that works across every language so, there is no global solution for you. You will have to check, for every language you noticed such behavior, if the formatter is built in or not, and look for settings individually.
You commented about using Java, and VS Code Java support doesn't provides a formatter, so I suppose you have some Java extension installed, maybe from RedHat. If that's the case, I've noticed (based on extension's Readme) that It has a Java: Open Java Formatter Settings command, which says opens the Eclipse formatter settings. Creates a new settings file if none exists. It's been a long time I don't use Eclipse, so I'm not sure how its settings works, and if it does support the format rule you want. But I suggest you to take a look.
Hope this helps
There is a setting that should affect all languages:
Editor > Comments: Insert Space
It is enabled by default, uncheck it.
It seems that setting java.format.comments.enabled to false was somewhat helpful:
java.format.comments.enabled setting in VSCode
However, it disables formatting for all comments, even JavaDoc ones.

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.

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 switch/control syntax highlighting in eclipse flexibly?

I have a file with extension .xml.
But it doesn't necessarily contain XML. It may also contain HTML and JavaScript. Now I would like to either have Eclipse decide inteligently/heuristically which syntax highlighting would be appropriate or to switch it myself.
Any ideas?
Eclipse associates files with an editor. You can let eclipse decide which editor to use (e.g. defaults per file extension) or select the editor by yourself. I guess you might already know that or have at least experienced it.
Syntax highlighting isn't always set seperately but instead part of some editor (together with stuff like keyboard shortcuts). So what you are going to need is an editor that behaves the way you want it to. I do not know if there is an editor like this available but one options is writing an eclipse plug-in and implementing such an editor.
Fortunately there are great editors for each of XML, javascript, HTML, etc that are all open source. I guess you might be able to use some of their code. Ideally as a client of their API / Objects or if it won't work out just by reusing code.
short answer: not possible. use PHPStorm instead :)

How can I enable auto complete support in Notepad++?

I am trying to add simple syntax highlighting and auto completion for a simple scripting language...
I added syntax highlighting using this article
Now I want to know how to enable auto completion with Notepad ++ for my custom language. Does anyone know how to do that?
The link provided by Mark no longer works, but you can go to:
Notpad++ 6.6.9
Settings -> Preferences -> Auto-Completion -> Enable auto-completion on each input.
I find it very annoying though, since a big autocomplete block is always coming up and I would just like to see autocomplete when I press tab or a key combination. I am fairly new to Notepad++ though. If you know of such a key combination, please feel free to reply. I found this question via Google, so we can always help others.
For basic autocompletion, have a look at the files in %ProgramFiles%\Notepad++\plugins\APIs. It's basically just an XML file with keywords in. If you want calltips ("function parameters hint"), check out these instructions.
I've never found any more documentation, but cpp.xml has a calltip for fopen, while php.xml is quite complete.
Go to
Settings -> Preferences -> Backup/Autocompletion
Check Enable auto-completion on each input. By default the radio button for Function completion gets checked, that will complete related function name as you type. But when you are editing something other than code, you can check for Word completion.
Check Function parameters hint on input, if you find it difficult to remember function parameters and their ordering.
Autocomplete in Notepad++ is as simple as hitting Ctrl + Enter or Ctrl + Space in the interface.
Ctrl + Enter - as simple as that!
This, for many people, will be better than autocompleting on everything.
Don't forget to add your libraries & check your versions. Good information is in Using Notepad Plus Plus as a script editor.
You can also add your own suggestion.
Open this path:
C:\Program Files\Notepad++\plugins\APIs
And open the XML file of the language, such as php.xml. Here suppose, you would like to add addcslashes, so just add this XML code.
<KeyWord name="addcslashes" func="yes">
<Overload retVal="void">
<Param name="void"/>
</Overload>
</KeyWord>
It is very easy:
Find the XML file with unity keywords
Copy only lines with "< KeyWord name="......" / > "
Go to C:\Program Files\Notepad++\plugins\APIs and find cs.xml for example
Paste what you copied in 1., but be careful: Don't delete any line of it cs.xml
Save the file and enjoy autocompleting :)
Open Notepad++ and Settings -> Preferences -> Auto-Completion -> Check the Auto-insert options you want.
this link will help alot: http://docs.notepad-plus-plus.org/index.php/Auto_Completion