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

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.

Related

Eclipse equivalent of CTRL-K in Netbeans

Netbeans has a nifty shortcut completion, I use while I type. It works in comments, in strings. Pretty much places where regular completion is useless. It basically autocompletes using the editor scope (in other words, whatever word matches closes to the point you are typing). Is there something similar in Eclipse ? I am making a transition due to lack of mybatis/mylyn support in netbeans. You can read more about it here https://blogs.oracle.com/chengfang/entry/why_am_i_using_netbeans .
It's called Word Completion. The key binding may vary; Ctrl/Cmd+Shift+L to find out.
CTRL+Space will show and sometimes autocomplete (depends on the settings you choose) methods names, variables and etc.
You can read more about specific settings and further fine tuning here.

Eclipse. Fuzzy search in Quick Switch Editor

Using Quick Switch Editor (ctrl+E) in Eclipse allows one to navigate trough currently open tabs.
Thing that bugs me is: you must use wildcard (*) to performe fuzzy search.
It looks like it's more convenient to use Open Type (ctrl+shift+T) functionality that support fuzzy search then Quick Switch Editor.
Is there any Eclipse configuration that I miss or plugin that will make my life better?
Kind regards.
I use AutoHotKey to automatically type * whenever I press Ctrl+E, which ends up being essentially the same as Quick Switch Editor using wildcard by default.
AutoHotKey Script:
#IfWinActive, ahk_class SWT_Window0
~^e::Send {*}
You could also set up something similar for "Open Resource" (Ctrl+Shift+R) and "Quick Outline" (Ctrl+O).
Quite some time past since I asked this question, but I think I have something to add now.
GotoFile plugin, I believe is good solution to above problem. It will perform fuzzy-search on all WorkSpace projects.
As it is it doesn't quite address 'navigate trough currently open tabs' problem, but I decided to improve it a bit. For example, if search term starts with '.' it will prioritize open tabs (search will be performed on all files, but open will appear on top; '.' itself will be ignored). Case sensitive fuzzy-search (with 'In' search term resource IndexPage.java will have priority over index.js). On startup -- just display list of currently open tabs (like Ctrl + E currently does).
Basically idea is to have 'single point of access' for QuickSwitchEditor, OpenType and OpenResource functionality. true, it will not replace them, but eliminate 90% of everyday use.

Name IDE function of auto-complete for functions, defines, etc in header files

Qt Creator, Eclipse, and almost IDE's have an auto-complete for the functions that I had created in the headers files and I can navigate through the definitions of the functions.
First I want to know how that feature is called so I can search if it is possible to do the same with sublime text.
Thanks
It is called code completion. Keep in mind that to show up functions defined in other than the current file, you need to create a project (or whatever sublime calls this) so it can scan further files.
You might find this question usefull:
Sublime Text 2 and ZF2 ... auto complete not works

Activating text editing macros on Netbeans

This question was asked on Super User but I didn't get any response so I moved it here...I believe it is relevant and important...
I've been using Netbeans on Mac OS X for sometime it has some really good features but it doesn't support most of the macros and that sucks. I'm not only talking about complicated emacs macros but even the most basic are not supported like C-e for the end of the line or C-a for the beginning of the line.
Can somebody help to activate macros ?
I'm not sure if you really mean macros. When I think of macros, I think of a series of commands and keystrokes being issued. In any case, single commands (shortcuts) like the ones you mention (end of a line and beginning of a line) are certainly supported by Netbeans by default with the home and end keys. You can replace those with the key combinations of your choice or add them as alternates.
In fact, Netbeans allows you to create entire profiles of shortcuts and ships with one for Emacs users and contains the exact shortcuts you mention. This functionality is accessed from the Tools > Options menu, Keymap tab.
If you are looking for actual macro capability, that is supported in Netbeans as well. You might have to do some digging for documentation and Netbeans only comes with 3 build in macros. You can define them directly or have Netbeans record your activities to a macro. Macros can be accessed from Tools > Options menu, Editor > macros tab.
Netbeans supports templates as well, which are pieces of predefined code or text that can be generated by entering an abbreviation in the editor and then hitting tab.

How to Make Eclipse More Like Emacs

I am very familiar with emacs--and I realize that there is nothing that it cannot do--but there are some things that it does not do well or efficiently. So, being between projects I am open to the idea of switching to a full-featured IDE such as Eclipse.
With muscle-memory being what it is, I would like to make Eclipse as emacs-like as possible. I have already discovered the excellent Emacs+ plugin which gets me about halfway there. However, I am still missing the following features of emacs which I routinely rely upon:
shell: It's not just a shell, it's also a buffer.
occur: Search->File... is close to what I want, but I just want it to search the current file--which might be a text file, a logfile, or a shell buffer, or whatever.
align-regexp: This awesome little command in emacs helps me make files more readable, and alignment helps with keyboard macros.
What plugins would you recommend to solve these issues? Are there any other emacs features you miss in Eclipse or plugins you would recommend?
Please, no emacs/vi zealots asking why on Earth I would do such a thing.
For the shell you have WickedShell
Ctrl+F is enough to trigger a Search within the current file. (does not create a new buffer with matched lines)
Only Mark Occurrences is about highlighting occurrences, but that is not as advanced as the Emacs function.
Formatter options can emulate "align-regex" function, as described here.
Preferences -> Java -> Code Style -> Formatter.
Click 'Edit' on the profile (you may need to make a new one since you can't edit the default).
In the indentation section select 'Align fields with columns'.
Then, in your code Ctrl+Shift+F will run that formatter.
I can confirm Brian's suggestion (Emacs key-bindings). What I do to resolve this dilemma is to use both Emacs and Eclipse simultaneously. They are both very good at reporting external changes to files so there is minimal chance of tromping on edits (but it can happen). More to the point, you can leverage the strengths of both tools without having to give up either one. The combination of using both tools and Eclipse having Emacs key-bindings makes this quite satisfactory for me.
IIRC (It's been a while since I've used eclipse) eclipse has a "use Emacs key-bindings" mode. I believe that there's also the option to tell eclipse to use emacs as its own editor...