How to make UltraEdit autocomplete class members/functions of C++ class? - autocomplete

I'm currently using UltraEdit, which is armed with Ctags, to edit C++ files (.cpp). Its Ctags support automatically autocompletes symbols while I'm typing—but it can't correctly confine itself to only the members of a class, which is so blind. How to make UltraEdit smarter like Vim+ctags+cppcomplete? So far, I can't find any plugins on web.

UltraEdit doesn't do a great job of auto complete when compared to an IDE like Eclipse etc. because it doesn't know how to parse tokens in a language specific way - i.e. it has no way of knowing what your variable/method names are and listing just those for auto complete.
However, UltraEdit does have a default auto-complete feature built in (control+space) - UltraEdit will search back 50K in the active file from the cursor location for words that match a partially typed word and show these. Go to Advanced > Configuration > Editor > Auto-complete and you can tick the option to "show auto-complete dialog automatically" after X number of chars.
Also, you can set language specific auto-complete files (and UtlraEdit's website has a few predefined ones you can download). So for example you can fill this file with a bunch of class names or other common words/tokens and they will always appear in the auto-complete dialog for that file type too. Link a specific auto-complete file to a file type through preferences:
Advanced > Configuation > Editor > Word Wrap/Tab Settings
Click Change List
Type c or java or whatever the extension is > click Add > click OK
Under the text "select extension for settings or default", select the new extension you just made.
Click "Browse" to link that file type to a specific auto-complete file.
Click OK to exit the Configuration dialog.
Lastly, as of UltraEdit 18, the editor got a lot better with templates. While you have a c file open, display the template view: View > Views/Lists > Template List. You should see in that template list a bunch of smart template for common c structures such as IF, DO etc etc. You can also create your own here too.
Note that all these things (search tokens 50k back in the file; list tokens in the autocomplete file; list templates) will all show up on control+space.

Related

Why can't i use palette in netbeans 8.2?

I don't really get the function of palette. (IDE Tools -> Palette)
Great tool, works nice in html and php, but in javascript it doesn't let me add anything nor does it show anything i could use.
It is locked or something?
Why can't i use palette in netbeans 8.2?
You can, but probably not in the way that you want, assuming that you want to be able to use the Palette with JavaScript files, because:
The Palette in NetBeans is primarily intended to be used for form development. It is not a general purpose tool for the automatic insertion of code.
The content of the Palette window is context sensitive, and the categories available in the Palette at any time are directly tied to the type of the file currently open in the editor window. For example, the categories available in the Palette for *.html files are different to those for *.jsf files.
Some file types, including JavaScript files (*.js) and Java files (*.java), have no associated categories. Although you can add a new category to the Palette for file types which already have one or more categories, you cannot create a new category in the Palette for a file type with no existing categories. This means that you cannot use the Palette with *.js files.
While NetBeans does not provide a category for JavaScript in the palette, you could add one yourself, but it would have to be tied to one of the file types that are already supported (e.g. *.html or *.jsp, but not *.js). For example, you could:
Create a new category named JavaScript, and add it to the Palette for *.html files.
Add an item named alert to that category which would allow you to insert <script>alert('Hello world!');</script> into *.html files by double clicking that alert entry in the Palette.
It is locked or something?
"locked" isn't the appropriate term since that would imply that you could somehow unlock the functionality, but you can't. At least not through the Palette user interface. NetBeans just doesn't support the use of the Palette with *.js files.
The alternative to using the Palette for JavaScript files is to add your own code templates: Tools > Options > Editor > Code Templates > select Language JavaScript > click New

How to quickly find files or symbols in a project in visual studio code?

Here's a demonstration of the feature in IntelliJ (https://www.youtube.com/watch?v=EtnI2doW6XE)?
In case the video isn't viewable, basically the user presses a key-combo, and a dialog box pops up that will reactively response and filter based on the string the user starts to type in. It will show classes and files (and much more) matching what you've typed in. I won't go in to all the details, as I'm not looking for an exact match to this functionality -- I'd be happy if it just searched based on file name for starters! Anything to prevent me from having to browse for a filename in the project Explorer to open the file in vs code when I want to switch to the given file.
I saw How do I search for files in Visual Studio Code? - for me (on Linux) Ctrl-E just shows the file I currently have open under the project explorer (useful sometimes, but not what I'm looking for).
Cmd + P opens a search bar for files (doc),
Cmd + T opens a search bar for symbols (doc),
Are you just looking for CTRL-P That brings up a file list. Which is searchable. You can then tab down and right arrow opens up that file. Enter will open a split editor on the file.
Also, if you CTR-p and then type ? you will get a list of keys you can hit such as to "Go to Symbols" and much more in your file or workspace.
And look at CTRL-R it probably does exactly what you are looking for as far as files go.

Eclipse - Highlighting same word occurrence of random extension file

Is there any option to make Eclipse highlight same occurrence of word in random extension file?
Eclipse works for known file types (.java, .php, py...), and it matches and highlights same occurrence but it won't match same words in random file types i.e. extension of .abcxyz?
According to the official Eclipse documentation:
To associate editors with various file types in the Workbench:
Open the command link General > Editors > File Associations
preference page.
Select the file type from the File types list, or
click Add to add a type that is not already on the list.
In the Associated editors list, select the editor that you want to
associate with that file type. To add an editor to the list:
a. Click Add. The Editor Selection dialog box opens.
b. Select Internal Editors or External Programs, depending on whether the editor that you want was built for the Workbench or runs
outside the Workbench.
c. If you select External Programs, you can click the Browse button to browse the file system.
d. Select the editor from the list and click OK.
Click on OK to finish associating the editor with the selected file type.
After doing this, Eclipse will be able to properly open files with any custom extension. The tricky part is the highlight thing, i.e., "how to highlight same occurrence of word". For that, you might need to create your custom syntax highlighting rules. According to this question and answer:
The Eclipse framework uses a fairly complex document model to do
syntax coloring (they call it coloring, not highlighting), it is not
as simple as it is in other editors.
If you really want to try and mess with it, you may want to read the
following from the Eclipse plug-in developer guide.
(The above link is now dead. This may be a similar document or this.)

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 can I get Eclipse File Search to skip certain files?

In my Eclipse project, I have a mixture of java files, xml, and various files with different file extensions. I want to perform searches on a regular basis on everything except for the java files, to look for certain settings.
Is there a way to tell Eclipse to search all the files, EXCEPT the one's with a .java extension?
The best thing you can do inside the file search dialog is to press the button "Choose" for the "File name patterns", then press "select all" and deselect "*.java".
But beware! This doesn't look for all file extensions in your project and lists them. It's a predefined set of extensions.
Yes, in your file search dialog, there is a "Choose" button next to the "file name patterns" textbox. It allows you to filter Select Types. After selection, you should just realize it is just regex of everything except for *.java.