1
0
Fork 0
mirror of synced 2024-11-18 23:05:34 -05:00
ultimate-vim/sources_non_forked/vim-scala/indent
2017-08-25 17:35:23 -07:00
..
README Add VIM Scala support 2017-08-25 17:35:23 -07:00
scala.vim Add VIM Scala support 2017-08-25 17:35:23 -07:00
testfile.scala Add VIM Scala support 2017-08-25 17:35:23 -07:00

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.