

Scala development in Vim - sashee
https://advancedweb.hu/2015/06/11/vim-scala/

======
weego
And as usual, the vacuous vim article consists of

1) install boat-load of addons to try and replicate the IDEs they're decrying

2) make vague and short statements on "the benefits" usually near an entire
paragraph about the drawbacks

3) still somehow recommend it even though it appears to be less efficient in
the use case provided

~~~
mhax
So true - I'm not sure what I expected. It always comes down to the fact that:

a) There is no intelligent auto-complete (not compared to an real IDE)

b) Background tasks of compiling/testing will block the UI. With scala
especially, this is an issue.

c) No comparable refactoring capability.

I once had high hopes that eclim would be the answer, but I think it's just
the wrong tool for the job. Let's not pretend vim can be something it was
never designed for.

Neovim however might help to solve this problems, but when that will see the
light of day, it seems to be hard to find out.

~~~
a_dev_musing
Feels like I'm spamming every comment within this article, but this is exactly
what Ensime is for. I hope that Vimside
([http://www.vim.org/scripts/script.php?script_id=4298](http://www.vim.org/scripts/script.php?script_id=4298))
up to date which addresses most of the above.

I don't think it would be too hard - mainly the server startup has been
tweaked so you dont embed Ensime.

Neovim is also interesting, I understand they have a much nicer plugin
architecture as well.

------
facorreia
Vim is my preferred editor, and I code Scala for a living, but I use IDEA for
it. The main reasons are:

\- The ability to safely rename identifiers.

\- The confidence that the "Find usages" tool gives on a large code base
(search just doesn't cut it).

\- Immediate, contextual syntax error information.

\- Excellent auto-complete.

\- Quickly navigate to declaration.

\- Syntax-aware indentation.

I usually have an sbt session open that is either running unit tests or
running a Play Framework server (with auto-reload).

~~~
yashap
Couldn't agree my more. I'm a big fan of Sublime, but when I work on big Scala
projects at work, I'd be MUCH less productive without IDEA.

The only significant wart for me is the mismatch between SBT and IDEA
projects. IDEA is stricter, there are valid SBT project structures that IDEA
hates. Can crop up if you're working on other people's projects, started with
Eclipse or a text editor. Other than that, IDEA is phenomenal for Scala
development.

~~~
a_dev_musing
Ensime-Sublime support is coming back see [https://github.com/ensime/ensime-
sublime](https://github.com/ensime/ensime-sublime) \- it is broken right now,
but I'm actively working on fixing it.

------
flurdy
The Ensime mainters did a talk at ScalaDays yesterday
[http://event.scaladays.org/scaladays-
amsterdam-2015#!#schedu...](http://event.scaladays.org/scaladays-
amsterdam-2015#!#schedulePopupExtras-6922) which included also their efforts
and plans on bringing Ensime to other editors/IDEs than Emacs
[https://github.com/ensime/ensime-server](https://github.com/ensime/ensime-
server). Though I am mostly interested in the revival of
[https://github.com/sublimescala/sublime-
ensime](https://github.com/sublimescala/sublime-ensime) this article did make
me want to try Scala in Vim again.

~~~
a_dev_musing
We did - hopefully you enjoyed it. We are talking with the maintainers of the
sublime plugin to bring it into the ensime org and I'm trying to a vaguely
working version out in the next few days.

------
melling
As an aside, this keyboard with an optional vim layout was mention on HN
yesterday.

[http://support.wasdkeyboards.com/customer/portal/articles/19...](http://support.wasdkeyboards.com/customer/portal/articles/1973584-vim-
layout)

------
baldfat
> I think it’s more of a philosophical difference rather than technological.

This is where the argument lives but a lot of people don't necessarily
understand this kind of decision making.

I like IDEs and I love command line. If I have a choice I will go CLI 90% of
the time. Why? I feel most comfortable with the command line and I think it
looks good, runs good and allows a ton of customization.

Using R for analytics I use the IDE RStudio

Need a REPL I use Project Juypter (IPython kernel agnostic)

Just about everything else I use VIM.

------
seniorsassycat
I've been using [eclim]([http://eclim.org/](http://eclim.org/)) for Java
development over the past year and it's a great experience.

From eclipse I get \- intelligent auto complete \- refactoring \- code search

From vim I get \- remote work through mosh + tmux \- preferred editor
semantics

Eclim has scala support, but I don't know how full featured it is.

------
karavelov
Scala in Vim is quite workable - I will try the quickfix plug-in that I didn't
knew about.

Something that I find useful is proper ctags extraction for Scala, so here it
is: [https://github.com/luben/sctags](https://github.com/luben/sctags)

I hope it may be useful for other people developing in Scala in Vim.

------
a_dev_musing
I'm really hoping that someone uses our recent work on Ensime to bring vimside
back to life. Hopefully provides a lot of the 'missing' features that vim
(semantic/type info), accurate completion etc. But its going to require a Vim
expert to step up and fix the integration.

------
erikb
Why is "Scala in Vim" such a famous tutorial topic? One of the best tutorial
guys on Vim also made a video about that:
[https://vimeo.com/83065681](https://vimeo.com/83065681)

------
gagdad
How I see it is that Vim is a text editor, Unix is an operating system, an and
IDE is an IDE.

You can use Vim inside your IDE as your text editor of choice. Using Vim as a
hacked together IDE is a misuse.

------
__Joker
Finally I settled to live with scale ide(eclipse) with vrapper for limited vim
functionality. All the plugin setting and feels extra waste of time and work.

------
nitishmd
I use Intellij IDEA with vim plugin, so its a win win.

~~~
ebiester
Many of us have had problems with speed and reliability with ideavim - how
have you managed to get it to a usable state?

~~~
nitishmd
Did not face any issue with speed, especially in the latest IDEA version. I
run it on ssd with i7. There some minor issues like :w is useless in ide as it
saves it anyway and recording does not work for me. But the benefits of ide +
functional vim greatly outweighs just using vim.

