The following is a list of utility commands provided by eclim. These are general purpose commands that are useful in and outside the scope of eclim.
:Buffers - Opens a temporary window with a list of all the currently listed buffers in vim (like :buffers). From this list you can open any of the files using one of the following shortcuts:
In addition to the above mappings you can also use <return> to execute the configured default action on the buffer under the cursor.
To configure the default action you can set the following variable:
g:EclimBuffersDefaultAction (defaults to 'split')
Note that eclim will track the tab where buffers are opened and closed
allowing :Buffers to filter the list to those whose primary tab is the
current tab, or for buffers not open, show those that were last open on the
current tab. If however you would like to still see all listed buffers, you
can append '!' to the command:
By default entries will be sorted by path name, but you may change the sorting via these two variables:
:Bufferscommand to filter the list of buffers to those accessed by the current tab. As noted above, you can still view all buffers with this option enabled by using
g:EclimBuffersTabTrackingis enabled, then eclim will delete any non-active buffers associated with the current tab when that tab is closed. The can be useful if you use a tab per project workflow and would like to close a project's tab and have any buffers for that project deleted as well.
:Only - Alternative for vim's :only command. The purpose of this command and the original vim version is to close all but the current window. Unfortunately there is no way to tell the vim version to exclude some windows you may wish to keep open (taglist, quickfix, etc.). The eclim version provides that ability via the g:EclimOnlyExclude and g:EclimOnlyExcludeFixed variables.
:OpenUrl [url] - Opens a url in your web browser, or optionally in Vim via netrw (:help netrw).
When executing the command you may supply the url to open, or if ommitted, it will open the url under the cursor. By default all urls will open in your web browser, but you may optionally configure a list of url patterns to be opened via the netrw plugin. The following example is configured to open all dtd, xml, xsd, and text files via netrw.
let g:EclimOpenUrlInVimPatterns = \ [ \ '\.\(dtd\|xml\|xsd\)$', \ '\.txt$', \ ]
For urls that match one of these patterns, you may also define how the file is to be opened in Vim (split, edit, etc.).
let g:EclimOpenUrlInVimAction = 'split'
If a url you want to open matches one of these patterns, but you want to force it to be opened in your browser, you can supply a bang (!) to force it to do so:
eclim#web#SearchEngine Helper function which provides the functionality needed to create search engine commands or mappings.
command -range -nargs=* Google call eclim#web#SearchEngine( \ 'http://www.google.com/search?q=<query>', <q-args>, <line1>, <line2>)
Adding the above command to your vimrc or similar provides you with a new :Google command allowing you to start a search on google.com in your browser from vim. This command can be invoked in a few ways.
First by supplying the word or words to search for as arguments to the command.
:Google "vim eclim" :Google vim eclim :Google +vim -eclim
Note that you can supply the arguments to the command just as you would when using the search input via google's homepage, allowing you to utilize the full querying capabilities of google.
The second method is to issue the command with no arguments. The command will then query google with the word under the cursor.
The last method is to visually select the text you want to search for and then execute the command.
eclim#web#WordLookup Helper function which can be used to create commands or mappings which lookup a word using an online reference like a dictionary or thesaurus.
command -nargs=? Dictionary call eclim#web#WordLookup( \ 'http://dictionary.reference.com/search?q=<query>', '<args>')
Adding the above command to your vimrc or similar provides you with a new :Dictionary command which can be used to look up a word on dictionary.reference.com. You can either supply the word to lookup as an argument to the command or it will otherwise use the word under the cursor.