Skip to content

Commit

Permalink
Added a couple of plugins and made navigating Scala projects a bit ea…
Browse files Browse the repository at this point in the history
…sier
  • Loading branch information
derekwyatt committed Nov 7, 2013
1 parent 29cc062 commit f891fd1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 56 deletions.
59 changes: 30 additions & 29 deletions bundle/from_github.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
# Stuff pulled from GitHub

* **AutoTags**: `git clone https://github.com/vim-scripts/autotags.git vim-autotags`
* **Blogit**: `git clone https://github.com/vim-scripts/blogit.vim.git vim-blogit`
* **BufKill**: `git clone https://github.com/vim-scripts/bufkill.vim.git vim-bufkill`
* **Completion**: `git clone https://github.com/MarcWeber/vim-addon-completion.git vim-completion`
* **EasyMotion**: `git clone https://github.com/vim-scripts/EasyMotion.git vim-easymotion`
* **EasyAlign**: `git clone https://github.com/vim-scripts/vim-easy-align.git vim-easyalign`
* **FSwitch**: `git clone https://github.com/derekwyatt/vim-fswitch.git vim-fswitch`
* **Forms**: `git clone https://github.com/megaannum/forms.git vim-forms`
* **Fugitive**: `git clone https://github.com/tpope/vim-fugitive.git vim-fugitive`
* **FuzzyFinder**: `git clone https://github.com/vim-scripts/FuzzyFinder.git vim-fuzzyfinder`
* **GNUPG**: `git clone https://github.com/vim-scripts/gnupg.vim.git vim-gnupg`
* **Gundo**: `git clone https://github.com/sjl/gundo.vim.git vim-gundo`
* **JSON**: `git clone https://github.com/vim-scripts/vim-addon-json-encoding.git vim-json`
* **Jellybeans**: `git clone https://github.com/nanotech/jellybeans.vim.git vim-jellybeans`
* **L9**: `git clone https://github.com/vim-scripts/L9.git vim-l9`
* **MWUtils**: `git clone https://github.com/MarcWeber/vim-addon-mw-utils.git vim-mwutils`
* **NERDTree**: `git clone https://github.com/scrooloose/nerdtree.git vim-nerdtree`
* **Protodef**: `git clone https://github.com/derekwyatt/vim-protodef.git vim-protodef`
* **SBT**: `git clone https://github.com/derekwyatt/vim-sbt.git vim-sbt`
* **Scala**: `git clone https://github.com/derekwyatt/vim-scala.git vim-scala`
* **Self**: `git clone https://github.com/megaannum/self.git vim-self`
* **Signs**: `git clone https://github.com/MarcWeber/vim-addon-signs.git vim-signs`
* **Solarized**: `git clone https://github.com/altercation/vim-colors-solarized.git vim-solarized`
* **Surround**: `git clone https://github.com/tpope/vim-surround.git vim-surround`
* **TwitVim**: `git clone https://github.com/vim-scripts/TwitVim.git vim-twitvim`
* **Unimpaired**: `git clone https://github.com/tpope/vim-unimpaired.git vim-unimpaired`
* **VimProc**: `git clone https://github.com/Shougo/vimproc.git vim-vimproc`
* **VimShell**: `git clone https://github.com/Shougo/vimshell.git vim-vimshell`
* **XPTemplate**: `git clone https://github.com/drmingdrmer/xptemplate.git vim-xptemplate`
* **AutoTags**: `git clone https://github.com/vim-scripts/autotags.git vim-autotags`
* **Blogit**: `git clone https://github.com/vim-scripts/blogit.vim.git vim-blogit`
* **BufKill**: `git clone https://github.com/vim-scripts/bufkill.vim.git vim-bufkill`
* **Completion**: `git clone https://github.com/MarcWeber/vim-addon-completion.git vim-completion`
* **ConfluenceWiki**: `git clone https://github.com/vim-scripts/confluencewiki.vim.git vim-confluence`
* **EasyMotion**: `git clone https://github.com/vim-scripts/EasyMotion.git vim-easymotion`
* **EasyAlign**: `git clone https://github.com/vim-scripts/vim-easy-align.git vim-easyalign`
* **FSwitch**: `git clone https://github.com/derekwyatt/vim-fswitch.git vim-fswitch`
* **Forms**: `git clone https://github.com/megaannum/forms.git vim-forms`
* **Fugitive**: `git clone https://github.com/tpope/vim-fugitive.git vim-fugitive`
* **FuzzyFinder**: `git clone https://github.com/vim-scripts/FuzzyFinder.git vim-fuzzyfinder`
* **GNUPG**: `git clone https://github.com/vim-scripts/gnupg.vim.git vim-gnupg`
* **Gundo**: `git clone https://github.com/sjl/gundo.vim.git vim-gundo`
* **JSON**: `git clone https://github.com/vim-scripts/vim-addon-json-encoding.git vim-json`
* **Jellybeans**: `git clone https://github.com/nanotech/jellybeans.vim.git vim-jellybeans`
* **L9**: `git clone https://github.com/vim-scripts/L9.git vim-l9`
* **MWUtils**: `git clone https://github.com/MarcWeber/vim-addon-mw-utils.git vim-mwutils`
* **NERDTree**: `git clone https://github.com/scrooloose/nerdtree.git vim-nerdtree`
* **Protodef**: `git clone https://github.com/derekwyatt/vim-protodef.git vim-protodef`
* **SBT**: `git clone https://github.com/derekwyatt/vim-sbt.git vim-sbt`
* **Scala**: `git clone https://github.com/derekwyatt/vim-scala.git vim-scala`
* **Self**: `git clone https://github.com/megaannum/self.git vim-self`
* **Signs**: `git clone https://github.com/MarcWeber/vim-addon-signs.git vim-signs`
* **Solarized**: `git clone https://github.com/altercation/vim-colors-solarized.git vim-solarized`
* **Surround**: `git clone https://github.com/tpope/vim-surround.git vim-surround`
* **TwitVim**: `git clone https://github.com/vim-scripts/TwitVim.git vim-twitvim`
* **Unimpaired**: `git clone https://github.com/tpope/vim-unimpaired.git vim-unimpaired`
* **VimProc**: `git clone https://github.com/Shougo/vimproc.git vim-vimproc`
* **VimShell**: `git clone https://github.com/Shougo/vimshell.git vim-vimshell`
* **XPTemplate**: `git clone https://github.com/drmingdrmer/xptemplate.git vim-xptemplate`
57 changes: 30 additions & 27 deletions xpt-personal/ftplugin/scala/scala.xpt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ function! s:f.getPackageLine(...)
endif
endfunction

XPT app hint=object\ Main\ extends\ App\ {...}
object `Main^ extends App {
`cursor^
}
function! s:f.getCurrentDir(...)
return expand('%:p:h:t')
endfunction

XPT impakka hint=Imports\ basic\ akka\ stuff
import akka.actor.{Actor, ActorRef, ActorSystem, Props}

XPT file hint=Standard\ Scala\ source\ file
//
Expand All @@ -119,6 +121,11 @@ object `objectName^ {
}
}

XPT app hint=Creates\ an\ "App"\ object
object `classname()^ extends App {
`cursor^
}

XPT afun hint=Creates\ an\ anonymous\ function
() => {
`cursor^
Expand Down Expand Up @@ -192,16 +199,11 @@ XPT groupwordspec hint=Creates\ a\ new\ WordSpec\ test\ group
XPT filewordspec hint=Creates\ a\ new\ WordSpec\ test\ file
`getPackageLine()^

import org.scalatest.{WordSpec, BeforeAndAfterEach, BeforeAndAfterAll}
import org.scalatest.matchers.MustMatchers

class `classname()^ extends WordSpec
with BeforeAndAfterAll
with BeforeAndAfterEach
with MustMatchers {
import org.scalatest.{WordSpec, Matchers}

class `classname()^ extends WordSpec with Matchers {
"`classNameFromSpec()^" should { //{1
`cursor^
`cursor^
} //}1
}
// vim:fdl=1:
Expand All @@ -215,7 +217,7 @@ def `receive^: Receive = {
}

XPT actor hint=Akka\ Actor\ class
class `ActorName^ extends Actor {
class `ActorName^ extends Actor with ActorLogging {
def receive = {
`cursor^
}
Expand Down Expand Up @@ -310,23 +312,24 @@ XPT bookblock wrap=code hint=Wraps\ a\ block\ of\ code\ in\ BEGIN/END
// FILE_SECTION_END{`name^}

XPT mod hint=New\ module\ for\ dependency
"`groupId^" % "`artifactId^" % "`revision^"

XPT dep hint=libraryDependencies\ ++=\ Seq\(...\)
libraryDependencies ++= Seq(
"`groupId^" % "`artifactId^" % "`revision^"
)

XPT aspectMessage hint=Primal\ Aspect\ Message\ Type
case class `messageName^(`...^`attrName^: `type^`...^) extends ToJsonConvertable {
def convertToJson: JsValue = `messageName^.jsf.write(this)
}
object `messageName^ extends JsValueUnapply`num^[`messageName^, `types^] {
val jsfHelper = jsonFormat`num^(`messageName^.apply)
}
"`groupId^" `%%^ "`artifactId^" % "`revision^"

XPT be hint=x\ must\ be\ \(y\)
`object^ must be (`target^)

XPT notbe hint=x\ must\ not\ be\ \(y\)
`object^ must not be (`target^)

XPT sbt hint=Creates\ a\ new\ build.sbt\ file
XSET name|def=getCurrentDir()
name := "`name^"

version := "`0.1^"

scalaVersion := "`2.10.3^"
`^

XPT dep hint=libraryDependencies\ :=\ Seq\(...\)
libraryDependencies := Seq(
"`groupId^" % "`artifactId^" % "`revision^"
)

0 comments on commit f891fd1

Please sign in to comment.