From 662fe0334ccf51ae32cd0ed871b37e5b73182678 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 3 May 2011 21:53:50 -0700 Subject: [PATCH] Initial commit --- .gitmodules | 27 ++++ README | 3 + Xdefaults | 63 +++++++++ gitconfig | 15 ++ indent.pro | 4 + ledgerrc | 2 + profile | 46 ++++++ rc | 26 ++++ screenrc | 27 ++++ setup.sh | 31 ++++ toprc | 14 ++ vim/.gitignore | 1 + vim/after/ftplugin/c.vim | 10 ++ vim/after/ftplugin/html.vim | 2 + vim/after/ftplugin/latex.vim | 90 ++++++++++++ vim/after/ftplugin/python.vim | 5 + vim/after/ftplugin/tex.vim | 91 ++++++++++++ vim/after/ftplugin/xml.vim | 1 + vim/autoload/pathogen.vim | 142 +++++++++++++++++++ vim/backup/.gitignore | 1 + vim/colors/ir_black.vim | 212 ++++++++++++++++++++++++++++ vim/colors/proton.vim | 63 +++++++++ vim/colors/pyte.vim | 94 +++++++++++++ vim/colors/zenburn.vim | 257 ++++++++++++++++++++++++++++++++++ vim/ftdetect/brainfuck.vim | 2 + vim/ftdetect/git.vim | 18 +++ vim/ftdetect/ledger.vim | 1 + vim/swap/.gitignore | 1 + vim/syntax/brainfuck.vim | 23 +++ vim/syntax/ledger.vim | 28 ++++ vimrc | 132 +++++++++++++++++ zprofile | 5 + zsh/func/mkcmod | 11 ++ zsh/func/mkmdir | 13 ++ zsh/func/pw | 12 ++ zsh/func/wiki | 12 ++ zshrc | 129 +++++++++++++++++ 37 files changed, 1614 insertions(+) create mode 100644 .gitmodules create mode 100644 README create mode 100644 Xdefaults create mode 100644 gitconfig create mode 100644 indent.pro create mode 100644 ledgerrc create mode 100644 profile create mode 100644 rc create mode 100644 screenrc create mode 100755 setup.sh create mode 100644 toprc create mode 100644 vim/.gitignore create mode 100644 vim/after/ftplugin/c.vim create mode 100644 vim/after/ftplugin/html.vim create mode 100644 vim/after/ftplugin/latex.vim create mode 100644 vim/after/ftplugin/python.vim create mode 100644 vim/after/ftplugin/tex.vim create mode 100644 vim/after/ftplugin/xml.vim create mode 100644 vim/autoload/pathogen.vim create mode 100644 vim/backup/.gitignore create mode 100644 vim/colors/ir_black.vim create mode 100644 vim/colors/proton.vim create mode 100644 vim/colors/pyte.vim create mode 100644 vim/colors/zenburn.vim create mode 100644 vim/ftdetect/brainfuck.vim create mode 100644 vim/ftdetect/git.vim create mode 100644 vim/ftdetect/ledger.vim create mode 100644 vim/swap/.gitignore create mode 100644 vim/syntax/brainfuck.vim create mode 100644 vim/syntax/ledger.vim create mode 100644 vimrc create mode 100644 zprofile create mode 100644 zsh/func/mkcmod create mode 100644 zsh/func/mkmdir create mode 100644 zsh/func/pw create mode 100644 zsh/func/wiki create mode 100644 zshrc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..60dcb0e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,27 @@ +[submodule "vim/bundle/surround"] + path = vim/bundle/surround + url = git://github.com/tpope/vim-surround.git +[submodule "vim/bundle/speeddating"] + path = vim/bundle/speeddating + url = git://github.com/tpope/vim-speeddating.git +[submodule "vim/bundle/blackboard"] + path = vim/bundle/blackboard + url = git://github.com/nelstrom/vim-blackboard.git +[submodule "vim/bundle/fugitive"] + path = vim/bundle/fugitive + url = git://github.com/tpope/vim-fugitive.git +[submodule "vim/bundle/snipmate"] + path = vim/bundle/snipmate + url = git://github.com/nelstrom/snipmate.vim.git +[submodule "vim/bundle/unimpaired"] + path = vim/bundle/unimpaired + url = git://github.com/tpope/vim-unimpaired.git +[submodule "vim/bundle/git"] + path = vim/bundle/git + url = git://github.com/tpope/vim-git.git +[submodule "vim/bundle/gundo"] + path = vim/bundle/gundo + url = git://github.com/sjl/gundo.vim.git +[submodule "vim/bundle/solarized"] + path = vim/bundle/solarized + url = git://github.com/altercation/vim-colors-solarized.git diff --git a/README b/README new file mode 100644 index 0000000..e833a72 --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +git clone eryn@tako:git/dotfiles.git ~/.dotfiles +cd ~/.dotfiles +./setup.sh diff --git a/Xdefaults b/Xdefaults new file mode 100644 index 0000000..4f5188f --- /dev/null +++ b/Xdefaults @@ -0,0 +1,63 @@ +! .Xdefaults +! Eryn Wells + +Xcursor*theme: Vanilla-DMZ + +XTerm*saveLines: 10000 +XTerm*scrollBar: false +Rxvt*saveLines: 10000 +Rxvt*scrollBar: false + +URxvt*font: xft:Inconsolata:size=14 + +Rxvt*termName: rxvt + +URxvt*color0: #2e3236 +URxvt*color1: #cc0000 +URxvt*color2: #73d216 +URxvt*color3: #edd400 +URxvt*color4: #3465a4 +URxvt*color5: #75507b +URxvt*color6: rgb:6/152/154 +URxvt*color7: #d3d7cf +XTerm*color0: #2e3236 +XTerm*color1: #cc0000 +XTerm*color2: #73d216 +XTerm*color3: #edd400 +XTerm*color4: #3465a4 +XTerm*color5: #75507b +XTerm*color6: rgb:6/152/154 +XTerm*color7: #d3d7cf + +URxvt*color8: #555753 +URxvt*color9: #ef2929 +URxvt*color10: #8ae234 +URxvt*color11: #fce94f +URxvt*color12: #729fcf +URxvt*color13: #ad7fa8 +URxvt*color14: #34e2e2 +URxvt*color15: #eeeeec +XTerm*color8: #555753 +XTerm*color9: #ef2929 +XTerm*color10: #8ae234 +XTerm*color11: #fce94f +XTerm*color12: #729fcf +XTerm*color13: #ad7fa8 +XTerm*color14: #34e2e2 +XTerm*color15: #eeeeec + +URxvt.depth: 32 +!URxvt.foreground: white +!URxvt.background: rgba:0000/0000/0000/dddd +XTerm*foreground: #d3d7cf +XTerm*background: black + +! Novel theme from OS X 10.6 Terminal.app +URxvt.foreground: rgb:3b/23/22 +URxvt.background: rgb:df/db/c3 +URxvt.colorBD: rgb:7f/2a/19 +URxvt.colorRV: rgba:74/73/50/c28e + +URxvt*scrollTtyKeypress: true +URxvt*scrollTtyOutput: false +URxvt*scrollWithBuffer: true diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..341fad6 --- /dev/null +++ b/gitconfig @@ -0,0 +1,15 @@ +[user] + name = Eryn Wells + email = eryn@3b518c.com +[core] + editor = vim +[color] + ui = auto +[merge] + tool = vimdiff +[alias] + st = status + co = checkout + ci = commit + br = branch + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative diff --git a/indent.pro b/indent.pro new file mode 100644 index 0000000..1f61fb5 --- /dev/null +++ b/indent.pro @@ -0,0 +1,4 @@ +// K&R style with some variations +// - Put return values on line above function headers +// - Continuation lines indented 8 spaces +-kr -psl -nce -nlp -ci8 diff --git a/ledgerrc b/ledgerrc new file mode 100644 index 0000000..945aa9c --- /dev/null +++ b/ledgerrc @@ -0,0 +1,2 @@ +--date-format %Y-%m-%d +--sort d diff --git a/profile b/profile new file mode 100644 index 0000000..47fb47b --- /dev/null +++ b/profile @@ -0,0 +1,46 @@ +# .profile +# vim: ft=zsh +# Eryn Wells + +# Environment settings +PAGER="less" +MANPAGER="less" +EDITOR="vim" +VISUAL=$EDITOR +LESSHISTFILE="-" +GREP_OPTIONS="--color=auto" +GREP_COLOR="1;32" +export PAGER MANPAGER EDITOR VISUAL LESSHISTFILE GREP_OPTIONS GREP_COLOR + +# Gotta do some machine specific setup +arch=`uname -s` +case $arch in + Linux) + export MAIL="/var/mail/$USER" + alias iptls='sudo iptables --line-numbers -nv -L' + alias ip6tls='sudo ip6tables --line-numbers -nv -L' + alias rlx="xrdb $HOME/.Xdefaults" + ;; + + Darwin) + PATH=/opt/local/bin:$PATH # MacPorts + alias indent='gnuindent' + ;; +esac + +# NetHack options +# use color in the terminal +export NETHACKOPTIONS="color" + +[ -e $HOME/.profile-local ] && source $HOME/.profile-local +[ -d $HOME/bin ] && PATH=$HOME/bin:$PATH + +# Start SSH agent for password-less logins +if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ] +then + eval `ssh-agent -s` + trap "kill $SSH_AGENT_PID" 0 +fi + +LEDGER_FILE=$HOME/Documents/Financial/personal.ledger +export LEDGER_FILE PATH diff --git a/rc b/rc new file mode 100644 index 0000000..c35b427 --- /dev/null +++ b/rc @@ -0,0 +1,26 @@ +# .intrc +# vim: ft=zsh +# Generic interactive shell setup +# Eryn Wells + +gls &>/dev/null +if [[ $? -eq 0 ]]; then + lsbin='gls' +else + lsbin='ls' +fi + +alias ls="$lsbin --color=auto" +alias la="$lsbin -A --color=auto" +alias ll="$lsbin -l --color=auto" +alias l.="$lsbin -d --color=auto .*" +alias j='jobs' +alias h='history' +alias df='df -h' +alias du='du -h' +alias g='git' +alias l='ledger' + +alias today='date +%Y-%m-%d' + +alias addkey="ssh-agent ~/.ssh/id_rsa" diff --git a/screenrc b/screenrc new file mode 100644 index 0000000..794bfb5 --- /dev/null +++ b/screenrc @@ -0,0 +1,27 @@ +# .screenrc +# Eryn Wells + +autodetach on +altscreen on +defflow auto +defscrollback 10000 +defutf8 on +startup_message off + +bind j focus down +bind k focus up +bind s split + +activity "%c activity -> %n%f %t" +bell "%c bell -> %n%f %t^G" +msgwait 1 + +vbell off + +hardstatus alwayslastline +hardstatus string "%{wk}[ %?%-Lw%?%{Rk}%n*%f %t%{Wk}%+Lw%?%= ][ %{Bk}%c %Y-%m-%d%{wk} ]" + +#escape ^ee + +screen -t 'mail' mutt +screen $SHELL diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..85b5a4a --- /dev/null +++ b/setup.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +dfdir=$(cd "$(dirname "$0")" && pwd) + +ln -s $dfdir/profile $HOME/.profile +ln -s $dfdir/rc $HOME/.rc + +ln -s $dfdir/zshrc $HOME/.zshrc +ln -s $dfdir/zsh $HOME/.zsh +ln -s $dfdir/zprofile $HOME/.zprofile + +ln -s $dfdir/vimrc $HOME/.vimrc +ln -s $dfdir/vim $HOME/.vim + +ln -s $dfdir/indent.pro $HOME/.indent.pro +ln -s $dfdir/screenrc $HOME/.screenrc +ln -s $dfdir/ledgerrc $HOME/.ledgerrc +ln -s $dfdir/toprc $HOME/.toprc + +ln -s $dfdir/gitconfig $HOME/.gitconfig + +[ `uname -s` = "Linux" ] && ln -s $dfdir/Xdefaults $HOME/.Xdefaults + +touch $HOME/.hushlogin + +# Initialized submodules +cd $dfdir +git submodule init +git submodule update + +exit 0 diff --git a/toprc b/toprc new file mode 100644 index 0000000..d4bb0d7 --- /dev/null +++ b/toprc @@ -0,0 +1,14 @@ +RCfile for "top with windows" # shameless braggin' +Id:a, Mode_altscr=0, Mode_irixps=1, Delay_time=1.000, Curwin=0 +Def fieldscur=AEHIOQTWKNMbcdfgjplrsuvyzX + winflags=30009, sortindx=10, maxtasks=0 + summclr=1, msgsclr=1, headclr=3, taskclr=1 +Job fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX + winflags=62777, sortindx=0, maxtasks=0 + summclr=6, msgsclr=6, headclr=7, taskclr=6 +Mem fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX + winflags=62777, sortindx=13, maxtasks=0 + summclr=5, msgsclr=5, headclr=4, taskclr=5 +Usr fieldscur=ABDECGfhijlopqrstuvyzMKNWX + winflags=62777, sortindx=4, maxtasks=0 + summclr=3, msgsclr=3, headclr=2, taskclr=3 diff --git a/vim/.gitignore b/vim/.gitignore new file mode 100644 index 0000000..a0e76af --- /dev/null +++ b/vim/.gitignore @@ -0,0 +1 @@ +.netrwhist diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim new file mode 100644 index 0000000..dafb674 --- /dev/null +++ b/vim/after/ftplugin/c.vim @@ -0,0 +1,10 @@ +set foldmethod=syntax +set sw=4 sts=4 +set noet + +"For the new omni-completion ":help ft-c-omni" +if has('mac') + set tags+=~/.vim/systags-osx +elseif has('linux') + set tags+=~/.vim/systags-linux +endif diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim new file mode 100644 index 0000000..ed6f38f --- /dev/null +++ b/vim/after/ftplugin/html.vim @@ -0,0 +1,2 @@ +setlocal shiftwidth=2 + diff --git a/vim/after/ftplugin/latex.vim b/vim/after/ftplugin/latex.vim new file mode 100644 index 0000000..4b96916 --- /dev/null +++ b/vim/after/ftplugin/latex.vim @@ -0,0 +1,90 @@ +" latex.vim +" vim macros for latex +" + +" document class header +map! ;dcart \documentclass[letterpaper,11pt]{article} +nmap ;dcart i\documentclass[letterpaper,11pt]{article} + +" document body +map! ;doc \begin{document}\end{document}kk +nmap ;doc i\begin{document}\end{document}kk + +"" environments +" tabular +map! ;tab \begin{tabular}{}\end{tabular}kk$i +nmap ;tab i\begin{tabular}{}\end{tabular}kk$ + +" tabular* +map! ;stab \begin{tabular*}{}{}\end{tabular*}kk$hhi +nmap ;stab i\begin{tabular*}{}{}\end{tabular*}kk$hh + +" enumerate +map! ;enum \begin{enumerate}\end{enumerate}k$i +nmap ;enum i\begin{enumerate}\end{enumerate}k$ + +" itemize +map! ;item \begin{itemize}\end{itemize}ki +nmap ;item i\begin{itemize}\end{itemize}k + +" center +map! ;cent \begin{center}\end{center}ki +nmap ;cent i\begin{center}\end{center}k + +" item +map! ;it \item + + +"" text manipulation +" bold +map! ;bf \textbf{}i +nmap ;bf i\textbf{} +vmap ;bf "xdi\textbf{"xpa} + +" emphasized +map! ;em \emph{}i +nmap ;em i\emph{} +vmap ;em "xdi\emph{"xpa} + +" teletype/monospaced +map! ;tt \texttt{}i +nmap ;tt \texttt{} +vmap ;tt "xdi\texttt{"xpa} + +" mbox +map! ;mb \mbox{}i +nmap ;mb \mbox{} +vmap ;mb "xdi\mbox{"xpa} + +" section +map! ;sa \section*{}i +nmap ;sa i\section*{} +vmap ;sa "xdi\section*{"xpa} +map! ;sna \section{}i +nmap ;sna i\section{} +vmap ;sna "xdi\section{"xpa} + +" subsection +map! ;sb \subsection*{}i +nmap ;sb i\subsection*{} +vmap ;sb "xdi\subsection*{"xpa} +map! ;snb \subsection{}i +nmap ;snb i\subsection{} +vmap ;snb "xdi\subsection{"xpa} + +" subsubsection +map! ;sc \subsubsection*{}i +nmap ;sc i\subsubsection*{} +vmap ;sc "xdi\subsubsection*{"xpa} +map! ;snc \subsubsection{}i +nmap ;snc i\subsubsection{} +vmap ;snc "xdi\subsubsection{"xpa} + + +" text size +map! ;lar {\large }i +map! ;Lar {\Large }i + +" comments +vmap ;com :s/^/%/g +vmap ;uncom :s/^%//g diff --git a/vim/after/ftplugin/python.vim b/vim/after/ftplugin/python.vim new file mode 100644 index 0000000..cf5e97c --- /dev/null +++ b/vim/after/ftplugin/python.vim @@ -0,0 +1,5 @@ +setlocal expandtab +"setlocal foldnestmax=3 +"setlocal fdm=indent +setlocal textwidth=80 + diff --git a/vim/after/ftplugin/tex.vim b/vim/after/ftplugin/tex.vim new file mode 100644 index 0000000..44d3a48 --- /dev/null +++ b/vim/after/ftplugin/tex.vim @@ -0,0 +1,91 @@ +" latex.vim +" vim macros for latex + +set nosi " `smart' indenting creates problems + +" document class header +map! ;dcart \documentclass[letterpaper,12pt]{article} +nmap ;dcart i\documentclass[letterpaper,12pt]{article} + +" document body +map! ;doc \begin{document}\end{document}kk +nmap ;doc i\begin{document}\end{document}kk + +"" environments +" tabular +map! ;tab \begin{tabular}{}\end{tabular}kk$i +nmap ;tab i\begin{tabular}{}\end{tabular}kk$ + +" tabular* +map! ;stab \begin{tabular*}{}{}\end{tabular*}kk$hhi +nmap ;stab i\begin{tabular*}{}{}\end{tabular*}kk$hh + +" enumerate +map! ;enum \begin{enumerate}\end{enumerate}k$i +nmap ;enum i\begin{enumerate}\end{enumerate}k$ + +" itemize +map! ;item \begin{itemize}\end{itemize}ki +nmap ;item i\begin{itemize}\end{itemize}k + +" center +map! ;cent \begin{center}\end{center}ki +nmap ;cent i\begin{center}\end{center}k + +" item +map! ;it \item + + +"" text manipulation +" bold +map! ;bf \textbf{}i +nmap ;bf i\textbf{} +vmap ;bf "xdi\textbf{"xpa} + +" emphasized +map! ;em \emph{}i +nmap ;em i\emph{} +vmap ;em "xdi\emph{"xpa} + +" teletype/monospaced +map! ;tt \texttt{}i +nmap ;tt \texttt{} +vmap ;tt "xdi\texttt{"xpa} + +" mbox +map! ;mb \mbox{}i +nmap ;mb \mbox{} +vmap ;mb "xdi\mbox{"xpa} + +" section +map! ;sa \section*{}i +nmap ;sa i\section*{} +vmap ;sa "xdi\section*{"xpa} +map! ;sna \section{}i +nmap ;sna i\section{} +vmap ;sna "xdi\section{"xpa} + +" subsection +map! ;sb \subsection*{}i +nmap ;sb i\subsection*{} +vmap ;sb "xdi\subsection*{"xpa} +map! ;snb \subsection{}i +nmap ;snb i\subsection{} +vmap ;snb "xdi\subsection{"xpa} + +" subsubsection +map! ;sc \subsubsection*{}i +nmap ;sc i\subsubsection*{} +vmap ;sc "xdi\subsubsection*{"xpa} +map! ;snc \subsubsection{}i +nmap ;snc i\subsubsection{} +vmap ;snc "xdi\subsubsection{"xpa} + + +" text size +map! ;lar {\large }i +map! ;Lar {\Large }i + +" comments +vmap ;com :s/^/%/g +vmap ;uncom :s/^%//g diff --git a/vim/after/ftplugin/xml.vim b/vim/after/ftplugin/xml.vim new file mode 100644 index 0000000..fc26a17 --- /dev/null +++ b/vim/after/ftplugin/xml.vim @@ -0,0 +1 @@ +set sw=2 sts=2 diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim new file mode 100644 index 0000000..01dddad --- /dev/null +++ b/vim/autoload/pathogen.vim @@ -0,0 +1,142 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 1.2 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" API is documented below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@= 700 " Vim 7.x specific colors + hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD + hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD + hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE + hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE + hi Search guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline +endif + +" Syntax highlighting +hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE +hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE + +hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end + +hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE +hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE + +hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE +hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE + +hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE +hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi Operator guifg=white guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE + +hi link Character Constant +hi link Boolean Constant +hi link Float Number +hi link Repeat Statement +hi link Label Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link SpecialComment Special +hi link Debug Special + + +" Special for Ruby +hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE +hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE +hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE +hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc +"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield +hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE +"rubyInclude +"rubySharpBang +"rubyAccess +"rubyPredefinedVariable +"rubyBoolean +"rubyClassVariable +"rubyBeginEnd +"rubyRepeatModifier +"hi link rubyArrayDelimiter Special " [ , , ] +"rubyCurlyBlock { , , } + +hi link rubyClass Keyword +hi link rubyModule Keyword +hi link rubyKeyword Keyword +hi link rubyOperator Operator +hi link rubyIdentifier Identifier +hi link rubyInstanceVariable Identifier +hi link rubyGlobalVariable Identifier +hi link rubyClassVariable Identifier +hi link rubyConstant Type + + +" Special for Java +" hi link javaClassDecl Type +hi link javaScopeDecl Identifier +hi link javaCommentTitle javaDocSeeTag +hi link javaDocTags javaDocSeeTag +hi link javaDocParam javaDocSeeTag +hi link javaDocSeeTagParam javaDocSeeTag + +hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE +"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE + + +" Special for XML +hi link xmlTag Keyword +hi link xmlTagName Conditional +hi link xmlEndTag Identifier + + +" Special for HTML +hi link htmlTag Keyword +hi link htmlTagName Conditional +hi link htmlEndTag Identifier + + +" Special for Javascript +hi link javaScriptNumber Number + + +" Special for Python +"hi link pythonEscape Keyword + + +" Special for CSharp +hi link csXmlTag Keyword + + +" Special for PHP diff --git a/vim/colors/proton.vim b/vim/colors/proton.vim new file mode 100644 index 0000000..83e62a1 --- /dev/null +++ b/vim/colors/proton.vim @@ -0,0 +1,63 @@ + +hi Normal guibg=#f0f0f0 guifg=#404040 gui=none +hi Comment guibg=#f0f0f0 guifg=#9098a0 gui=none +hi ToDo guibg=#f0f0f0 guifg=#9098a0 gui=bold + +hi Cursor guibg=#404040 guifg=#a0a0a0 +hi CursorColumn guibg=#e0e0e0 guifg=#202020 +hi CursorLine guibg=#e0e0e0 guifg=#202020 + +hi NonText guibg=#d0d0d0 guifg=#606060 gui=none +hi Visual guibg=#d0d0d0 guifg=#606060 gui=none +hi Folded guibg=#d0d0d0 guifg=#606060 gui=none +hi TabLineFill guibg=#d0d0d0 guifg=#606060 gui=none +hi SpecialKey guibg=#e8e8e8 guifg=#a0a0a0 gui=none +hi Search guibg=#808080 guifg=#ffffff gui=bold + +hi ModeMsg guibg=#f0f0f0 guifg=#304050 gui=bold +hi MoreMsg guibg=#f0f0f0 guifg=#304050 gui=bold + +hi StatusLine guibg=#808080 guifg=#f0f0f0 gui=bold,italic +hi StatusLineNC guibg=#707070 guifg=#d0d0d0 gui=italic +hi VertSplit guibg=#707070 guifg=#909090 gui=none + +hi LineNr guibg=#d0d0d0 guifg=#606060 gui=none + +hi Underlined guifg=#202020 guibg=#f0f0f0 gui=underline + +hi Statement guibg=#e0e0e0 guifg=#606060 gui=none +hi Label guibg=#e0e0e0 guifg=#606060 gui=underline +hi Operator guifg=#a77039 guibg=#f0f0f0 gui=none + +hi Title guibg=#f0f0f0 guifg=#202020 gui=underline + +" Python: @ in front of decorators +"hi Define guifg=#906000 guibg=#f0e8c0 gui=bold +hi Define guifg=#605080 guibg=#ece8f0 gui=italic,bold +hi Include guifg=#605080 guibg=#dcd8e0 gui=none + +hi Function guifg=#b08020 guibg=#f0e8c0 gui=underline + +hi Conditional guibg=#e0e8f0 guifg=#5080b0 gui=bold +hi Repeat guibg=#e0e8d8 guifg=#509030 gui=bold +hi Exception guibg=#f0f0f0 guifg=#a03020 gui=bold + +hi Type guifg=#607080 guibg=#f0f0f0 gui=underline +hi PreProc guifg=#605080 guibg=#dcd8e0 gui=italic +hi Identifier guifg=#608050 guibg=#c0e0c0 gui=none + + +hi Constant guifg=#508040 guibg=#f0f0f0 +hi Number guifg=#508040 guibg=#f0f0f0 +hi String guifg=#a07060 guibg=#f0ece8 gui=italic +hi Special guifg=#603020 guibg=#f0ece8 gui=italic + + +hi DiffAdd guifg=#ffcc7f guibg=#a67429 +hi DiffDelete guifg=#ff7f50 guibg=#a62910 +hi DiffChange guifg=#7fbdff guibg=#425c78 +hi DiffText guifg=#8ae234 guibg=#4e9a06 + +hi SpellBad gui=undercurl guisp=#f02020 + + diff --git a/vim/colors/pyte.vim b/vim/colors/pyte.vim new file mode 100644 index 0000000..7f173c4 --- /dev/null +++ b/vim/colors/pyte.vim @@ -0,0 +1,94 @@ + +set background=light + +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "pyte" + +if version >= 700 + hi CursorLine guibg=#f6f6f6 + hi CursorColumn guibg=#eaeaea + hi MatchParen guifg=white guibg=#80a090 gui=bold + + "Tabpages + hi TabLine guifg=black guibg=#b0b8c0 gui=italic + hi TabLineFill guifg=#9098a0 + hi TabLineSel guifg=black guibg=#f0f0f0 gui=italic,bold + + "P-Menu (auto-completion) + hi Pmenu guifg=white guibg=#808080 + "PmenuSel + "PmenuSbar + "PmenuThumb +endif +" +" Html-Titles +hi Title guifg=#202020 gui=bold +hi Underlined guifg=#202020 gui=underline + + +hi Cursor guifg=black guibg=#b0b4b8 +hi lCursor guifg=black guibg=white +hi LineNr guifg=#ffffff guibg=#c0d0e0 + +hi Normal guifg=#404850 guibg=#f0f0f0 + +hi StatusLine guifg=white guibg=#8090a0 gui=bold,italic +hi StatusLineNC guifg=#506070 guibg=#a0b0c0 gui=italic +hi VertSplit guifg=#a0b0c0 guibg=#a0b0c0 gui=NONE + +" hi Folded guifg=#708090 guibg=#c0d0e0 +hi Folded guifg=#a0a0a0 guibg=#e8e8e8 gui=italic + +hi NonText guifg=#c0c0c0 guibg=#e0e0e0 +" Kommentare +hi Comment guifg=#a0b0c0 gui=italic + +" Konstanten +hi Constant guifg=#a07040 +hi String guifg=#4070a0 +hi Number guifg=#40a070 +hi Float guifg=#70a040 +"hi Statement guifg=#0070e0 gui=NONE +" Python: def and so on, html: tag-names +hi Statement guifg=#007020 gui=bold + + +" HTML: arguments +hi Type guifg=#e5a00d gui=italic +" Python: Standard exceptions, True&False +hi Structure guifg=#007020 gui=italic +hi Function guifg=#06287e gui=italic + +hi Identifier guifg=#5b3674 gui=italic + +hi Repeat guifg=#7fbf58 gui=bold +hi Conditional guifg=#4c8f2f gui=bold + +" Cheetah: #-Symbol, function-names +hi PreProc guifg=#1060a0 gui=NONE +" Cheetah: def, for and so on, Python: Decorators +hi Define guifg=#1060a0 gui=bold + +hi Error guifg=red guibg=white gui=bold,underline +hi Todo guifg=#a0b0c0 guibg=NONE gui=italic,bold,underline + +" Python: %(...)s - constructs, encoding +hi Special guifg=#70a0d0 gui=italic + +hi Operator guifg=#408010 + +" color of s etc... +"hi SpecialKey guifg=#d8a080 guibg=#e8e8e8 gui=italic +hi SpecialKey guifg=#d0b0b0 guibg=#f0f0f0 gui=none + +" Diff +hi DiffChange guifg=NONE guibg=#e0e0e0 gui=italic,bold +hi DiffText guifg=NONE guibg=#f0c8c8 gui=italic,bold +hi DiffAdd guifg=NONE guibg=#c0e0d0 gui=italic,bold +hi DiffDelete guifg=NONE guibg=#f0e0b0 gui=italic,bold + + diff --git a/vim/colors/zenburn.vim b/vim/colors/zenburn.vim new file mode 100644 index 0000000..26a3756 --- /dev/null +++ b/vim/colors/zenburn.vim @@ -0,0 +1,257 @@ +" Vim color file +" Maintainer: Jani Nurminen +" Last Change: $Id: zenburn.vim,v 1.20 2006/09/11 11:31:10 jnurmine Exp $ +" URL: http://slinky.imukuppi.org/zenburn/ +" License: GPL +" +" Nothing too fancy, just some alien fruit salad to keep you in the zone. +" This syntax file was designed to be used with dark environments and +" low light situations. Of course, if it works during a daybright office, go +" ahead :) +" +" Owes heavily to other Vim color files! With special mentions +" to "BlackDust", "Camo" and "Desert". +" +" To install, copy to ~/.vim/colors directory. Then :colorscheme zenburn. +" See also :help syntax +" +" Credits: +" - Jani Nurminen - original Zenburn +" - Steve Hall & Cream posse - higher-contrast Visual selection +" - Kurt Maier - 256 color console coloring, low and high contrast toggle, +" bug fixing +" +" CONFIGURABLE PARAMETERS: +" +" You can use the default (don't set any parameters), or you can +" set some parameters to tweak the Zenburn colours. +" +" * You can now set a darker background for bright environments. To activate, use: +" contrast Zenburn, use: +" +" let g:zenburn_high_Contrast = 1 +" +" * To get more contrast to the Visual selection, use +" +" let g:zenburn_alternate_Visual = 1 +" +" * To use alternate colouring for Error message, use +" +" let g:zenburn_alternate_Error = 1 +" +" * The new default for Include is a duller orange. To use the original +" colouring for Include, use +" +" let g:zenburn_alternate_Include = 1 +" +" * To turn the parameter(s) back to defaults, use UNLET: +" +" unlet g:zenburn_alternate_Include +" +" Setting to 0 won't work! +" +" That's it, enjoy! +" +" TODO +" - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble +" - IME colouring (CursorIM) +" - obscure syntax groups: check and colourize +" - add more groups if necessary + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="zenburn" + +hi Boolean guifg=#dca3a3 +hi Character guifg=#dca3a3 gui=bold +hi Comment guifg=#7f9f7f gui=italic +hi Conditional guifg=#f0dfaf gui=bold +hi Constant guifg=#dca3a3 gui=bold +hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold +hi Debug guifg=#bca3a3 gui=bold +hi Define guifg=#ffcfaf gui=bold +hi Delimiter guifg=#8f8f8f +hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold +hi DiffChange guibg=#333333 +hi DiffDelete guifg=#333333 guibg=#464646 +hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold +hi Directory guifg=#dcdccc gui=bold +hi ErrorMsg guifg=#80d4aa guibg=#2f2f2f gui=bold +hi Exception guifg=#c3bf9f gui=bold +hi Float guifg=#c0bed1 +hi FoldColumn guifg=#93b3a3 guibg=#3f4040 +hi Folded guifg=#93b3a3 guibg=#3f4040 +hi Function guifg=#efef8f +hi Identifier guifg=#efdcbc +hi IncSearch guibg=#f8f893 guifg=#385f38 +hi Keyword guifg=#f0dfaf gui=bold +hi Label guifg=#dfcfaf gui=underline +hi LineNr guifg=#9fafaf guibg=#262626 +hi Macro guifg=#ffcfaf gui=bold +hi ModeMsg guifg=#ffcfaf gui=none +hi MoreMsg guifg=#ffffff gui=bold +hi NonText guifg=#404040 +hi Number guifg=#8cd0d3 +hi Operator guifg=#f0efd0 +hi PreCondit guifg=#dfaf8f gui=bold +hi PreProc guifg=#ffcfaf gui=bold +hi Question guifg=#ffffff gui=bold +hi Repeat guifg=#ffd7a7 gui=bold +hi Search guifg=#ffffe0 guibg=#284f28 +hi SpecialChar guifg=#dca3a3 gui=bold +hi SpecialComment guifg=#82a282 gui=bold +hi Special guifg=#cfbfaf +hi SpecialKey guifg=#9ece9e +hi Statement guifg=#e3ceab gui=none +hi StatusLine guifg=#313633 guibg=#ccdc90 +hi StatusLineNC guifg=#2e3330 guibg=#88b090 +hi StorageClass guifg=#c3bf9f gui=bold +hi String guifg=#cc9393 +hi Structure guifg=#efefaf gui=bold +hi Tag guifg=#e89393 gui=bold +hi Title guifg=#efefef gui=bold +hi Todo guifg=#dfdfdf guibg=bg gui=bold +hi Typedef guifg=#dfe4cf gui=bold +hi Type guifg=#dfdfbf gui=bold +hi Underlined guifg=#dcdccc gui=underline +hi VertSplit guifg=#2e3330 guibg=#688060 +hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline +hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold +hi WildMenu guibg=#2c302d guifg=#cbecd0 gui=underline + +" Entering Kurt zone +if &t_Co > 255 + hi Boolean ctermfg=181 + hi Character ctermfg=181 cterm=bold + hi Comment ctermfg=108 + hi Conditional ctermfg=223 cterm=bold + hi Constant ctermfg=181 cterm=bold + hi Cursor ctermfg=233 ctermbg=109 cterm=bold + hi Debug ctermfg=181 cterm=bold + hi Define ctermfg=223 cterm=bold + hi Delimiter ctermfg=245 + hi DiffAdd ctermfg=66 ctermbg=237 cterm=bold + hi DiffChange ctermbg=236 + hi DiffDelete ctermfg=236 ctermbg=238 + hi DiffText ctermfg=217 ctermbg=237 cterm=bold + hi Directory ctermfg=188 cterm=bold + hi ErrorMsg ctermfg=115 ctermbg=236 cterm=bold + hi Exception ctermfg=249 cterm=bold + hi Float ctermfg=251 + hi FoldColumn ctermfg=109 ctermbg=238 + hi Folded ctermfg=109 ctermbg=238 + hi Function ctermfg=228 + hi Identifier ctermfg=223 + hi IncSearch ctermbg=228 ctermfg=238 + hi Keyword ctermfg=223 cterm=bold + hi Label ctermfg=187 cterm=underline + hi LineNr ctermfg=248 ctermbg=235 + hi Macro ctermfg=223 cterm=bold + hi ModeMsg ctermfg=223 cterm=none + hi MoreMsg ctermfg=15 cterm=bold + hi NonText ctermfg=238 + hi Number ctermfg=116 + hi Operator ctermfg=230 + hi PreCondit ctermfg=180 cterm=bold + hi PreProc ctermfg=223 cterm=bold + hi Question ctermfg=15 cterm=bold + hi Repeat ctermfg=223 cterm=bold + hi Search ctermfg=230 ctermbg=236 + hi SpecialChar ctermfg=181 cterm=bold + hi SpecialComment ctermfg=108 cterm=bold + hi Special ctermfg=181 + hi SpecialKey ctermfg=151 + hi Statement ctermfg=187 ctermbg=234 cterm=none + hi StatusLine ctermfg=237 ctermbg=186 + hi StatusLineNC ctermfg=236 ctermbg=108 + hi StorageClass ctermfg=249 cterm=bold + hi String ctermfg=174 + hi Structure ctermfg=229 cterm=bold + hi Tag ctermfg=181 cterm=bold + hi Title ctermfg=7 ctermbg=234 cterm=bold + hi Todo ctermfg=108 ctermbg=234 cterm=bold + hi Typedef ctermfg=253 cterm=bold + hi Type ctermfg=187 cterm=bold + hi Underlined ctermfg=188 ctermbg=234 cterm=bold + hi VertSplit ctermfg=236 ctermbg=65 + hi VisualNOS ctermfg=236 ctermbg=210 cterm=bold + hi WarningMsg ctermfg=15 ctermbg=236 cterm=bold + hi WildMenu ctermbg=236 ctermfg=194 cterm=bold + if exists("g:zenburn_high_Contrast") + hi Normal ctermfg=188 ctermbg=234 + else + hi Normal ctermfg=188 ctermbg=237 + hi Cursor ctermbg=109 + hi diffadd ctermbg=237 + hi diffdelete ctermbg=238 + hi difftext ctermbg=237 + hi errormsg ctermbg=237 + hi foldcolumn ctermbg=238 + hi folded ctermbg=238 + hi incsearch ctermbg=228 + hi linenr ctermbg=238 + hi search ctermbg=238 + hi statement ctermbg=237 + hi statusline ctermbg=144 + hi statuslinenc ctermbg=108 + hi title ctermbg=237 + hi todo ctermbg=237 + hi underlined ctermbg=237 + hi vertsplit ctermbg=65 + hi visualnos ctermbg=210 + hi warningmsg ctermbg=236 + hi wildmenu ctermbg=236 + endif +endif + + +if exists("g:zenburn_high_Contrast") + " use new darker background + hi Normal guifg=#dcdccc guibg=#1f1f1f + hi CursorLine guibg=#000000 gui=bold + hi Pmenu guibg=#242424 guifg=#ccccbc + hi PMenuSel guibg=#353a37 guifg=#ccdc90 gui=bold + hi PmenuSbar guibg=#2e3330 guifg=#000000 + hi PMenuThumb guibg=#a0afa0 guifg=#040404 + hi MatchParen guifg=#f0f0c0 guibg=#383838 gui=bold +else + " Original, lighter background + hi Normal guifg=#dcdccc guibg=#3f3f3f + hi CursorLine guibg=#434443 + hi Pmenu guibg=#2c2e2e guifg=#9f9f9f + hi PMenuSel guibg=#242424 guifg=#d0d0a0 gui=bold + hi PmenuSbar guibg=#2e3330 guifg=#000000 + hi PMenuThumb guibg=#a0afa0 guifg=#040404 + hi MatchParen guifg=#b2b2a0 guibg=#2e2e2e gui=bold +endif + +if exists("g:zenburn_alternate_Visual") + " Visual with more contrast, thanks to Steve Hall & Cream posse + " gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier + hi Visual guifg=#000000 guibg=#71d3b4 gui=none + hi VisualNOS guifg=#000000 guibg=#71d3b4 gui=none +else + " use default visual + hi Visual guifg=#233323 guibg=#71d3b4 gui=none + hi VisualNOS guifg=#233323 guibg=#71d3b4 gui=none +endif + +if exists("g:zenburn_alternate_Error") + " use a bit different Error + hi Error guifg=#ef9f9f guibg=#201010 gui=bold +else + " default + hi Error guifg=#e37170 guibg=#332323 gui=none +endif + +if exists("g:zenburn_alternate_Include") + " original setting + hi Include guifg=#ffcfaf gui=bold +else + " new, less contrasted one + hi Include guifg=#dfaf8f gui=bold +endif + " TODO check every syntax group that they're ok diff --git a/vim/ftdetect/brainfuck.vim b/vim/ftdetect/brainfuck.vim new file mode 100644 index 0000000..ea19e1d --- /dev/null +++ b/vim/ftdetect/brainfuck.vim @@ -0,0 +1,2 @@ +au BufNewFile,BufRead *.bf set filetype=brainfuck +au BufNewFile,BufRead *.b set filetype=brainfuck diff --git a/vim/ftdetect/git.vim b/vim/ftdetect/git.vim new file mode 100644 index 0000000..727bf0c --- /dev/null +++ b/vim/ftdetect/git.vim @@ -0,0 +1,18 @@ +" Git +autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG set ft=gitcommit +autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig +autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase +autocmd BufNewFile,BufRead .msg.[0-9]* + \ if getline(1) =~ '^From.*# This line is ignored.$' | + \ set ft=gitsendemail | + \ endif +autocmd BufNewFile,BufRead *.git/** + \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' | + \ set ft=git | + \ endif + +" This logic really belongs in scripts.vim +autocmd BufNewFile,BufRead,StdinReadPost * + \ if getline(1) =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' | + \ set ft=git | + \ endif diff --git a/vim/ftdetect/ledger.vim b/vim/ftdetect/ledger.vim new file mode 100644 index 0000000..0f42d61 --- /dev/null +++ b/vim/ftdetect/ledger.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.ledger set filetype=ledger diff --git a/vim/swap/.gitignore b/vim/swap/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/vim/swap/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/vim/syntax/brainfuck.vim b/vim/syntax/brainfuck.vim new file mode 100644 index 0000000..a501803 --- /dev/null +++ b/vim/syntax/brainfuck.vim @@ -0,0 +1,23 @@ +" brainfuck.vim +" Author: Eryn Wells +" Last Modified: 2010-11-09 + +syn match IncrementPtr '>' +syn match DecrementPtr '<' +syn match IncrementVal '+' +syn match DecrementVal '-' +syn match OutputVal '\.' +syn match InputVal ',' +syn match LoopStart '\[' +syn match LoopEnd ']' +syn match Comment '[^><+\-.,[\]]*' contains=ALL + +hi IncrementPtr ctermfg=blue +hi DecrementPtr ctermfg=blue +hi IncrementVal ctermfg=green +hi DecrementVal ctermfg=green +hi OutputVal ctermfg=magenta +hi InputVal ctermfg=magenta +hi LoopStart ctermfg=cyan +hi LoopEnd ctermfg=cyan +hi Comment ctermfg=grey diff --git a/vim/syntax/ledger.vim b/vim/syntax/ledger.vim new file mode 100644 index 0000000..fa4299e --- /dev/null +++ b/vim/syntax/ledger.vim @@ -0,0 +1,28 @@ +syn case ignore + +syn keyword bangDirective include account end transparent contained containedin=ledgerDirective + +syn keyword periodRecurring daily weekly biweekly monthly bimonthly quarterly yearly contained containedin=ledgerPeriodEntry +syn keyword periodSingle day week month quarter year contained containedin=periodEvery +syn keyword periodPlural days weeks months quarters years contained containedin=periodEveryN +syn match periodEvery 'every\s\+' nextgroup=periodSingle +syn match periodEveryN 'every \(\d\+\)\=\s\+' nextgroup=periodPlural + +syn case match + +syn match ledgerComment '^;.*' +syn match ledgerCommand '^[YPNDC]' +syn match ledgerDirective '^!' nextgroup=bangDirective +syn match ledgerPeriodEntry '^\~\s*.*'he=s contains=periodRecurring,periodEvery,periodEveryN +"syn match ledgerAutomatedEntry '^=\s*'he=s contains=valueExpression + +hi def link ledgerComment Comment +hi def link ledgerCommand Keyword +hi def link ledgerDirective Special +hi def link ledgerPeriodEntry Special + +hi def link periodRecurring Keyword +hi def link periodSingle Keyword +hi def link periodPlural Keyword +hi def link periodEvery Keyword +hi def link periodEveryN Keyword diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..85f0290 --- /dev/null +++ b/vimrc @@ -0,0 +1,132 @@ +" ~/.vimrc +" Eryn Wells + +call pathogen#runtime_append_all_bundles() +call pathogen#helptags() + +set nocompatible "use enhanced vim features + +set autoread "reread files changed outside of vim +set noautowrite "don't write files before commands like :next and :make + +set ffs=unix,dos,mac "order of line ending formats to try + +" command line +" always show current mode and cursor position +set ruler +set showmode +set showcmd + +" line breaking and wrapping +set wrap +set linebreak +set textwidth=80 + +" formatting options +set fo+=n "format numbered lists properly +set fo+=2 "format paragraphs with first line indent different from rest + +" list view options +set lcs+=tab:>- "make tabs look like >--..--- in list mode +set lcs+=eol:$ "make end of line print $ in list mode + +" searching +set ignorecase +set smartcase +set incsearch +set hlsearch + +" spelling +if has('win32') || has('win64') + set spellfile=~/_vim/spelling.en.add +else + set spellfile=~/.vim/spelling.en.add +endif +set spelllang=en +autocmd FileType text set spell + +" vim for windows uses _ instead of . to prefix config files +if has('win32') || has('win64') + set directory=~/_vim/swap + set backupdir=~/_vim/backup +else + set directory=~/.vim/swap + set backupdir=~/.vim/backup +endif + +" backup and recovery +set undolevels=500 +set updatecount=100 +set viminfo=%100,'100,/100,h,\"500,:100,n~/.viminfo +set history=200 + +set showmatch + +set backspace=indent,eol,start + +" tabbing and indenting +set tabstop=8 +set shiftwidth=4 +set softtabstop=4 +set expandtab +set smarttab +set nojoinspaces + +set number +set scrolloff=3 +set sidescrolloff=5 +set bg=light + +set pastetoggle= + +" completion menu +set wildmenu +set wildmode=longest,list +set wildignore+=*.o,*~,.lo,*.pdf + +if has('mouse') + set mouse=a +endif + +set modeline +set modelines=12 + +if &t_Co > 2 || has('gui_running') + syntax enable +endif + +if has('autocmd') + filetype plugin indent on + autocmd FileType text setlocal textwidth=76 + + " Jump to last known cursor position unless it's the first line, or past the + " end of the file + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif +endif + +" tell SnipMate who I am +let g:snips_author = 'Eryn Wells ' + +if has('autocmd') + autocmd BufWritePost .vimrc source $MYVIMRC +endif + +if has('gui_running') + if has('win32') || has('win64') + set guifont=Inconsolata:h18 + elseif has('mac') + set guifont=Inconsolata:h18 + elseif has('linux') + set guifont=Inconsolata\ 14 + endif + set cursorline + set guioptions-=T " turn off toolbar + set guioptions-=m " turn off toolbar + colorscheme blackboard +endif + +let mapleader=',' +nmap v :tabedit $MYVIMRC diff --git a/zprofile b/zprofile new file mode 100644 index 0000000..5c3cefd --- /dev/null +++ b/zprofile @@ -0,0 +1,5 @@ +# .zprofile +# vim:ft=zsh +# Eryn Wells + +source $HOME/.profile diff --git a/zsh/func/mkcmod b/zsh/func/mkcmod new file mode 100644 index 0000000..39b7b84 --- /dev/null +++ b/zsh/func/mkcmod @@ -0,0 +1,11 @@ +#!/bin/zsh +# vim:ft=zsh + +mkcmod () +{ + if [[ $1 == "" ]]; then + echo "Usage: $0 mod_name" + else + touch $1.{c,h} + fi +} diff --git a/zsh/func/mkmdir b/zsh/func/mkmdir new file mode 100644 index 0000000..58410d6 --- /dev/null +++ b/zsh/func/mkmdir @@ -0,0 +1,13 @@ +#!/bin/zsh +# vim:ft=zsh + +# make a Maildir directory +mkmdir () +{ + if [[ $1 == "" ]]; then + echo "Usage: $0 mdir_name" + else + mkdir -p $1/{new,cur,tmp} + fi +} + diff --git a/zsh/func/pw b/zsh/func/pw new file mode 100644 index 0000000..0ddf086 --- /dev/null +++ b/zsh/func/pw @@ -0,0 +1,12 @@ +#!/bin/zsh +# vim:ft=zsh + +pw () +{ + length='12' + if [[ $1 -ne "" ]]; then + length=$1 + fi + + tr -dc 'A-Za-z0-9!@#$%^&*' < /dev/urandom | fold -w $length | head -n 1 +} diff --git a/zsh/func/wiki b/zsh/func/wiki new file mode 100644 index 0000000..e741b2a --- /dev/null +++ b/zsh/func/wiki @@ -0,0 +1,12 @@ +#!/bin/zsh +# vim:ft=zsh + +wiki () +{ + if [[ $1 == "" ]]; then + echo "Usage: wiki [term]" + else + dig +short txt $1.wp.dg.cx + fi +} + diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..9567bed --- /dev/null +++ b/zshrc @@ -0,0 +1,129 @@ +# .zshrc +# Eryn Wells + +# PROMPT +# :--:user@host:dir% +# Dash one gets filled with * when there are background jobs +# Dash two gets filled with ! when the last command failed +# Colors are determined based on terminal type (I think there's a better way) +# With elevated privilieges, user is colored red and/or bolded +# RPROMPT (currently unused) +# Time in 24 hour format +# Current working directory and parent +autoload is-at-least +if (is-at-least '4.3.7'); then + bgjob="%(1j.%B%F{magenta}*%F{default}%b.)" + cmdstat="%(0?..%B%F{red}!%F{default}%b)" + isroot="%(!.%B%F{red}# %F{default}%b.)" +else + autoload -U colors + colors + bgjob="%(1j.%{$fg_bold[magenta]%}*%{$reset_color%}.)" + cmdstat="%(0?..%{$fg_bold[red]%}!%{$reset_color%})" + isroot="%(!.%{$fg_bold[red]%}# %{$reset_color%}.)" + + # where do I include these? + #bgjob="%(1j.%B*%b.)" + #cmdstat="%(0?..%B!%b)" + #isroot="%(!.%B#%b.)" + #mytime="%T" +fi + +PROMPT=" %h %(!.%B%F{red}.)%3~ %#%(!.%F{default}%b.) " +RPROMPT="%m" + +precmd () +{ + # Set xterm and screen titles + [ -n $DISPLAY ] && print -Pn "\e]2;%n@%m\a" +} + +# Shell options +setopt \ + TRANSIENT_RPROMPT \ + EXTENDED_GLOB \ + MULTIOS + +# load bash/zsh/ksh agnostic configurations +source $HOME/.rc + +alias -g nc='netcat' +alias -g lessnw='less -S' + +# suffix aliases +alias -s c='vim' +alias -s tex='vim' +alias -s txt='vim' +alias -s xml='vim' +alias -s jar='java -jar' + +# History settings +setopt \ + APPEND_HISTORY \ + EXTENDED_HISTORY \ + INC_APPEND_HISTORY \ + HIST_FIND_NO_DUPS \ + HIST_IGNORE_SPACE \ + HIST_NO_STORE \ + HIST_IGNORE_DUPS \ + HIST_REDUCE_BLANKS + +HISTSIZE=10000 +SAVEHIST=200 +HISTFILE="$HOME/.zhistory" + +#[ -n "$DISPLAY" ] && alias -s pdf='evince' +#[ -n "$DISPLAY" ] && alias -s dvi='evince' + +# host specific initialization +[ -e $HOME/.zshrc-local ] && . ~/.zshrc-local + +# emacs command line editing +bindkey -v + + +# +# Completion +# + +# load completion system +autoload -U compinit +compinit + +# Completion options +setopt \ + AUTO_REMOVE_SLASH \ + COMPLETE_IN_WORD + +# Cache completions +zstyle ':completion::complete:*' use-cache 1 +zstyle ':completion::complete:*' cache-path ~/.zsh/cache + +# For rm, cp, and mv don't complete if file is on the line already +zstyle ':completion:*:rm:*' ignore-line yes +zstyle ':completion:*:cp:*' ignore-line yes +zstyle ':completion:*:mv:*' ignore-line yes + +# Remove trailing slashes in directory arguments +zstyle ':completion:*' squeeze-slashes true + +# Never select parent directory +zstyle ':completion:*:cd:*' ignore-parents parent pwd + +# Expand partial paths +zstyle ':completion:*' expand 'yes' + + +### +# FUNCTIONS +### + +# function path +fpath=($HOME/.zsh/func $fpath) + +# Wikipedia lookup, courtesy of msanders@github +autoload wiki +autoload mkmdir +autoload pw +autoload mkcmod +