Fetching contributors…
Cannot retrieve contributors at this time
390 lines (313 sloc) 11 KB
This is a mirror of
This is the alpha release of Vimside (Vim Scala IDE). Vimside is
built upon the ENSIME server: github:
Two outstanding Ensime features to be implemented are more
regression tests and debugging. I also hope to port the latest
verion of InSynth over to Ensime.
With this release there has been added the ActWin (Action Window)
which can be used to display compile errors (generated by either
Ensime or SBT) (a quickfix window replacement) and the result of
the command "use-of-symbol-at-point" can use the ActWin (rather
than quickfix window). The ActWin is highly configurable.
Also, User and Project Options can now be defined
in Java-like properties files (rather than in the option.vim files).
By default the
With previous releases a variable at bottom of the plugin/vimside.vim file
have been added which allows one to turn on logging during Vimside Option
loading. For the Vimside logger, Options must first be loaded
in order to configure it. Thus, no logging when loading Options.
So, I added a non-configurable logger that only logs in the
vimside#options#manager.vim file. Hopefully, this will help
users figure out whats happening during option loading.
Also, the example project code has been moved under the directory
data/vimside/projects - since there are now two example projects
and will be a couple more in the future. Additionally, the tests
have been moved under data/vimside/tests. I will be adding more
unit/regression tests in the future.
I expect to continue to update the sources on github frequently, flushing
out the features.
Vimside communicates with the Ensime server using Shougo vimproc
( git:// ),
a very clean and elegant C-language binding to sockets (and also pipes,
ptys, files, etc.). Vimside also uses Shougo vimshell to launch and
communicate with the Scala Repl.
The current pre-alpha has only be run against the Ensime pre-built
ensime_2.9.2- and ensime_2.10.0-
Look at the plugin/vimside.vim file for key mappings: how to start the
Ensime server and the currently supported commands.
Vimside is based upon Ensime and, as a result, at the core of Vimside
are the capabilities of Ensime. These are reflected in the Ensime
commands supported by Vimside. The full set of Emacs Ensime commands
and key bindings can be found in comments in the Vimside file
plugin/Vimside.vim. Of those commands, those with Vim key mappings
are also in that file and they, basically, reflect that part of Ensime
that is currently implemented in Vimside. I mirrored the Vim key
mappings to reflect the Emacs-Ensime key bindings but the user is free
to define their own mappings. At the top of the Vimside plugin file
there is code that will source a file called 'plugin_user.vim' located
in the Vimside 'data' directory: ../data/vimside/plugin_user.vim
instead of the plugin file if it exists.
Current Supported Ensime Commands:
Start Ensime
This makes sure that the current environment and Option settings are
correct and then launches the Ensime backend server. The Ensime server
writes a file where it puts the socket port that its client should use.
Vimside reads that file, gets the port number, and provides Ensime
with configuration information.
Stop Ensime
There is also an autocmd that will kill the Ensime server when the
user exists Vim.
Map <Tab> to Omni-Code Completion in insert mode
This mapping maybe overridden by the mapping is some other plugin
(like a snipmate binding), So, if it does not seem to work for you
list the current mappings and see what is overriding it.
Very Useful.
Symbol At Point
With cursor on variable, jump to the definition of its symbol.
One can easily jump back and forth.
The Emacs key binding uses the Meta key. In GVim I could get this
to work and so in GVim the key mapping mirrors the Emacs Ensime
key binding. But, with Vim in an XTerm, I could not get the Meta/Alt
key to be recognized (and there is NO single place where there is
a definitive, failsafe guide for getting Meta/Alt key mappings to
work, so I have a different binding for Vim.
Very useful.
Implementations: 1
Selection Expand/Contract
Select the surrounding syntactic context and easily shrink/grow the
Implementations: 2
Global Public Search
Search for method or types through project code using space separated
search terms.
Implementations: 1
Hover To Symbol
Place cursor (or mouse) over a variable and its Symbol will be
Cute but requires frequent server polling.
Implementations: 3
Open Browser Info
With cursor over Scala/Java variable, type, etc. invoke the associated
on-line web api documentation (if it exists).
Implementations: 1
Use of Symbol At Point
List all references to the symbol under the cursor.
Very useful.
Implementations: 1
SBT Command-Line
Switch to the sbt command-line (works for sbt projects only)
Implementations: 2
Launch Repl
Switch to the Scala interpreter, with project classes in the classpath.
TBD: cut/paste code fragments into Repl.
Implementations: 1
Typecheck Current File
Typecheck the current file and display errors and warnings.
Very useful.
Implementations: 1
Typecheck All Files
Typecheck the all files and display errors and warnings.
Very useful.
Implementations: 1
Re-Show Errors/Warnings
Show all errors and warnings in the project.
Very useful.
Implementations: 1
Format Source
Format the current Scala source file.
Implementations: 1
Rename the symbol at point.
Organize imports.
Extract local.
Extract method.
Inline local.
Add import for type at point.
Import suggestions
Implementations: 1
Build the entire project.
Rebuild the project incrementally.
Implementations: 1
Popup Menu
Bring up Popup menu with all Vimside commands (requires Forms library).
Useful for folks who have not yet learned the key mappings.
Implementations: 1
Browse Source Roots
Directory browser of project sources (project code base).
Implementations: 2
Browse Reference Source Roots
Directory browser of project reference sources (Java and Scala libraries).
Implementations: 2
Option Viewer/Editor
Bring up the Option Viewer/Editor (requires Forms library). Lets one
see all of the Vimside configurable Options and their current value.
To be implemented will be an Editor allowing for the modification of
some "dynamic" Options at runtime.
Implementations: 1
OmmiCompletions using <c-x><c-o>.
Very Useful.
Implementations: 1
Package Inspector
Inspect imported package, current file's package and the package
specified in the ensime configuration ':package'.
Very Useful.
Implementations: 1
Type Inspector
Click on type and see information, Click on information and see its
information. Move about Inspector history.
Very Useful.
Implementations: 1
Ensime Capabilities to be Supported:
Seems to be a dead project (see:
Run Application
Debug Application
Start and run the debugger.
Start and run the debugger.
Set a breakpoint.
Clear a breakpoint.
Step over.
Step out.
Continue from a breakpoint.
Kill the debug session.
Inspect the local variable at cursor.
Show backtrace.
And others
Key Mappings
" Start Ensime
if has("gui_running")
" Stop Vimside
" Start completing a method/variable.
" Inspect the type of the expression under the cursor.
" Inspect package at point
" Inspect the project package if set in envime configure file.
" M-. (dot)
" Jump to definition of symbol under cursor.
" Note that the Meta/Alt keys, while easy to use with GVim, are,
" at best, an advanture and, at worst, impossible, to get working
" with non-GVim - thus the mapping is different for non-gui-running.
if has("gui_running")
" M-, (comma)
" Pop back to previously visited position.
if has("gui_running")
" Select the surrounding syntactic context. Subsequent taps of '.'
" and ',' will grow and shrink the selection, respectively.
" Search globally for methods or types.
" Scalex search for methods or types.
" Show (web api) documentation for symbol at point
" Mouse Hover
" Echo the type of the expression under the cursor.
" Inspect the package of the current source file.
" List all references to the symbol under the cursor.
" Switch to the sbt command-line (works for sbt projects only)
" s sbt switch
" sbt do compile
" sbt do clean
" sbt do package
" sbt do exit
" invoke the sbt command interpreter
" Switch to the scala interpreter, with project classes in the classpath.
" Typecheck the current file.
" Typecheck all files in the project.
" (Re-)Show all errors and warnings in the project.
" Format the current Scala source file.
" Undo a refactoring or formatting change.
" Go to the next compilation note in the current buffer.
" C-c C-d x
" Where x is one of:
" d Start and run the debugger.
" r Start and run the debugger.
" b Set a breakpoint.
" u Clear a breakpoint.
" s Step.
" n Step over.
" o Step out.
" c Continue from a breakpoint.
" q Kill the debug session.
" i Inspect the local variable at cursor.
" t Show backtrace.
" a Clear all breakes
" Where x is one of:
" r Rename the symbol at point.
" o Organize imports.
" l Extract local.
" m Extract method.
" i Inline local.
" t Add import for type at point.
" Import suggestions
" Where x is one of:
" b Build the entire project.
" r Rebuild the project, incrementally.
" Reload the .ensime file and recompile the project. Useful if you hit
" a server bug.
" Start the automatic configuration file generator.
" Make PopUp
" browse source roots
" browse referenct source roots
" option editor