Skip to content

Commit

Permalink
Got rid of stupid Minimap toggle. Fixed up some stuff in my templates…
Browse files Browse the repository at this point in the history
… for scala and tex - my tastes have changed over the last little while and I've been correcting these after expansion more than I've been using them as-is.
  • Loading branch information
derekwyatt committed Feb 25, 2012
1 parent 1c25452 commit 7ae913c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
4 changes: 3 additions & 1 deletion vimrc
Expand Up @@ -661,7 +661,9 @@ function! ToggleMinimap()
endfunction

command! ToggleMinimap call ToggleMinimap()
nnoremap <space> :ToggleMinimap<CR>

" I /literally/ never use this and it's pissing me off
" nnoremap <space> :ToggleMinimap<CR>

"-----------------------------------------------------------------------------
" Commands
Expand Down
19 changes: 19 additions & 0 deletions xpt-personal/ftplugin/scala/scala.xpt.vim
Expand Up @@ -223,6 +223,25 @@ lazy val `depName^ = "`package^" % "`name^" % "`version^" % "`type^"
XPT package hint=package\ for\ this\ file
`getPackageLine()^

XPT akkatest hint=Test\ file\ for\ Akka\ code
`getPackageLine()^

import akka.actor.ActorSystem
import akka.testkit.{TestKit, ImplicitSender}
import org.scalatest.WordSpec
import org.scalatest.matchers.MustMatchers

class `classname()^(_system: ActorSystem) extends TestKit(_system)
with ImplicitSender
with WordSpec
with MustMatchers {
def this() = this(ActorSystem("`classname()^"))

"`classNameFromSpec()^" should { //{1
`cursor^
} //}1
}

XPT multijvm hint=Multi\ JVM\ Test\ for\ Scala
`getPackageLine()^

Expand Down
26 changes: 18 additions & 8 deletions xpt-personal/ftplugin/tex/tex.xpt.vim
Expand Up @@ -9,29 +9,29 @@ XPT tt wrap=text hint=\\texttt{...}
XPT chapter wrap=title hint=\\chapter{...}
% `title^ <<<1
\chapter{`title^}
\label{sec:`label^}
\label{chp:`title^S(SV(' ', '_', 'g'), '\([A-Z]\)', '\l\1', 'g')^}
`cursor^

XPT s wrap=title hint=\\section{...}
% - `title^ <<<1
\section{`title^}
\label{sec:`label^}
\label{sec:`title^S(SV(' ', '_', 'g'), '\([A-Z]\)', '\l\1', 'g')^}
`cursor^

XPT ss wrap=title hint=\\subsection{...}
% -- `title^ <<<1
\subsection{`title^}
\label{sec:`label^}
\label{sec:`title^S(SV(' ', '_', 'g'), '\([A-Z]\)', '\l\1', 'g')^}
`cursor^

XPT sss wrap=title hint=\\subsubsection{...}
% --- `title^ <<<1
\subsubsection{`title^}
\label{sec:`label^}
\label{sec:`title^S(SV(' ', '_', 'g'), '\([A-Z]\)', '\l\1', 'g')^}
`cursor^

XPT heading wrap=title hint=\\subsubsection*{...}
\subsubsection{`title^}
\subsubsection*{`title^}
`cursor^

XPT begin hint=\\begin{}...\\end{}
Expand All @@ -55,6 +55,16 @@ XPT ic hint=\\lstinline{code}
XPT fn hint=\\footnote{...}
\footnote{`^}`cursor^

XPT insertCodeFile hint=Inserts\ an\ entire\ code\ file
\begin{lstlisting}[frame=b,caption=`caption^]
INCLUDE_SOURCE_FILE{src/`location^.scala}
\end{lstlisting}

XPT insertCodeSection hint=Inserts\ a\ section\ from\ a\ code\ file
\begin{lstlisting}[frame=b,numbers=left,caption=`caption^]
INCLUDE_SOURCE_FILE_SECTION{src/`location^.scala,`section^}
\end{lstlisting}

XPT e wrap=text hint=\\emph
\emph{`text^}`cursor^

Expand Down Expand Up @@ -87,11 +97,11 @@ XPT table hint=\\begin{tabular}...\\end{tabular}
\end{center}

XPT figure hint=\\begin{figure*}...\\end{figure*}
\begin{figure*}
\begin{figure*}[h]
\centering
\includegraphics[scale=0.5, viewport = 0 0 0 0]{target/`name^.pdf}
\includegraphics[scale=0.5]{GRAPHICS_OUTPUT_DIR/`name^.pdf}
\caption{`cursor^}
\label{fig:`name^}
\label{fig:`name^S(SV('\([a-z]\)\([A-Z]\)', '\1_\l\2', 'g'), '[A-Z]', '\l&', 'g')^}
\end{figure*}

XPT eqnarray hint=\\begin{eqnarray*}...\\end{eqnarray*}
Expand Down

0 comments on commit 7ae913c

Please sign in to comment.