Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Move tab settings to ftplugin. Closes #49

Agreed that these are not usually in the indent files, typically overridden in
`after/ftplugin` or `autocmd FileType`, so this makes that possible.

'tabstop' is best left alone when the others are set along with 'expandtab'.

References #60.
latest commit 1f90f5e59b
@ches ches authored

README

Scala Indent file for Vim
=========================

You can check 'testfile.scala' in this directory to see what I'm testing
against.  I'm mostly just trying to fit the major conventions that people would
code in with Scala, and not all of the possibilities - life's too short for that
and I'd rather be writing Scala code than Vim indent code.

With that said, if there's something you're passionate about and you want it to
be properly indented, and you can't hack it in yourself, then feel free to drop
me a line and we'll fight about it.

You'll see the following comments in 'testfile.scala':

    /**
     * The following stuff doesn't work, but honestly, it's pretty
     * pathological stuff... format your code differently.
     *
     * ---- 1. ----
     *
     *    if (b) 1
     *    else
     *      if (c) 2
     *    else 3
     *
     *    Do this instead:
     *
     *    if (b) 1
     *    else {
     *      if (c) 2
     *      else 3
     *    }
     *    
     *
     * ---- 2. ----
     *
     *    if (b) 1
     *    else
     *      if (c)
     *        2
     *        else 3
     *
     *    Do this instead:
     *
     *    if (b) 1
     *    else {
     *      if (c) 2
     *      else 3
     *    }
     *
     *    or this...
     *    
     *    if (b) 1
     *    else {
     *      if (c)
     *        2
     *      else
     *        3
     *    }
     *
     * ---- 3. ----
     *    
     *    if (b) 1
     *    else {
     *      if (c)
     *        2
     *        else 3
     *    }
     *
     *    Do the same as in number 2
     */

In other words, for the forseeable future... do something different to fix the
cases that don't work. :)

If you've got any questions about what's defined now, you can reach me at
http://derekwyatt.org.

Something went wrong with that request. Please try again.