views:

517

answers:

7

I'm tired of using IDEs for scala because it can take several minutes to write one line of code on my computer (before I started programming in scala I didn't surmise that it is slow). It's a great pity that there is no option to turn off some features of scala plugin (of any IDE) that devour 100% of my cpu power and not necessary for me.

I want to switch to text editor. I have 2 things that I realy need from editor - syntax highlighting and navigating source code. What I mean:

def foo = Bar.foo

Bar class is located somewhere in project code or 3dparty lib; CTRL+left mouse click on "Bar" => jump to Bar's code.

So, could you suggest text editor with scala syntax and source code navigating support?

+9  A: 

Use ENSIME for emacs. Video presentation.

folone
+3  A: 

You can use Notepad++, there is a syntax-highlighting file in the Scala distribution (for instructions see e.g. http://vbvyas.wordpress.com/2010/02/06/notepad-and-scala/ )

Landei
I'm currently using it. It lacks my second issue.
Jeriho
+2  A: 

I would like to suggest JEdit. There's also Redcar, but it doesn't support code navigation (often a feature of IDEs).

Magnus
+6  A: 

I know that the ENSIME is probably superior, but I have been a Vim freak for 10 years, so the vi shortcuts are in my genes.

If you are a Vimmer like me, you should download 3 files from

http://lampsvn.epfl.ch/trac/scala/browser/scala-tool-support/trunk/src/vim/

.. and put them like this (in .vim in your $HOME):

// What files are scala files? (= ends with .scala)
~/.vim/ftdetect/scala.vim 

// Indentation 
~/.vim/indent/scala.vim  

// Syntax highlighting
~/.vim/syntax/scala.vim

you can use the following .vimrc-file to get syntax-highlighting and other stuff:

set nocompatible "Not vi compativle (Vim is king)

""""""""""""""""""""""""""""""""""
" Syntax and indent
""""""""""""""""""""""""""""""""""
syntax on " Turn on syntax highligthing
set showmatch  "Show matching bracets when text indicator is over them

colorscheme delek

" Switch on filetype detection and loads 
" indent file (indent.vim) for specific file types
filetype indent on
filetype on
set autoindent " Copy indent from the row above
set si " Smart indent

""""""""""""""""""""""""""""""""""
" Some other confy settings
""""""""""""""""""""""""""""""""""
" set nu " Number lines
set hls " highlight search
set lbr " linebreak

" Use 2 space instead of tab during format
set expandtab
set shiftwidth=2
set softtabstop=2
olle kullberg
I do not recommend the 31-create-scala.vim plugin, since the recommended way of naming packages does not follow the folder structure in Scala. package com.programmera.app.domain would correspond to src/main/scala/domain (suggested by jboner). This structure (i.e. skipping the com/programmera/app folders) is simply more convenient.
olle kullberg
A: 

I do like the Zeus Lite editor.

Blake7
+3  A: 

For TextMate there is also plugins avaliable.

(Also usable with e-texteditor on Linux and Windows, but needs tweeks)

oluies
A: 

Did you really try all IDEs? I find IntelliJ IDEA pretty fast and nice. It gets slow when the Structure view is visible, but you can hide it and this particular problem is gone. The plug-in has improved a lot in the last months, you can customize quite a bit in the preferences. Much better experience than for example JEdit.

ItemState