new setup

This commit is contained in:
2017-12-20 17:18:58 +01:00
parent adeafb708f
commit 1bffa2af83
5 changed files with 17 additions and 88 deletions

View File

@@ -3,6 +3,11 @@ zepto
filter remove_inline ;.*$
extension zp
3rd_gen_scale 1.25
Carp
filter remove_matches ^\s*;
filter remove_inline ;.*$
extension carp
3rd_gen_scale 1.25
JSX
filter remove_matches ^\s*//
filter call_regexp_common C

View File

@@ -1,30 +0,0 @@
(define (die msg)
(begin
(write msg)
(exit 1)))
(define (usage)
(die "increment_version [position]\n\tposition defaults to 2"))
(define (parse-args)
(cond
((eq? 0 (length zepto:args)) 2)
((and (string:num? (car zepto:args))
(eq? 1 (length zepto:args)))
(string->number (car zepto:args)))
(else (usage))))
(define (main position)
(if (not (file-exists? "VERSION"))
(die "A version file is needed in the current directory")
(let* ((version (read-contents "VERSION"))
(new-version (|> (string:split version ".")
(curry map string->number)
list->vector
($ (vector:update % position add1))
(curry vector:map number->string)
($ (string:join % ".")))))
(with-output-file "VERSION" (curry write new-version)))))
(main (parse-args))
(exit 0)

View File

@@ -1,15 +0,0 @@
(load "ascii.zp")
(define cowsay (import "ascii:cowsay"))
(let ((trimmed (|> (delay (string:join zepto:args))
(lambda (x) (string:substitute x "\t" " "))
string->list
list->vector
(curry vector:reduce
(lambda (acc x) (if (and (eq? x " ") (eq? (vector:last acc) x))
acc
(++ acc x)))
{})
vector->list
list->string)))
(cowsay trimmed))
""

7
vimrc
View File

@@ -42,7 +42,7 @@ nnoremap Q <nop>
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
" let Vundle manage Vundle
@@ -80,14 +80,15 @@ Bundle 'christoomey/vim-tmux-navigator'
" Haskell
Bundle 'raichoo/haskell-vim'
Bundle 'enomsg/vim-haskellConcealPlus'
Bundle 'eagletmt/ghcmod-vim'
" Bundle 'enomsg/vim-haskellConcealPlus'
" Bundle 'eagletmt/ghcmod-vim'
Bundle 'eagletmt/neco-ghc'
Bundle 'Twinside/vim-hoogle'
" Other programming languages
Bundle 'digitaltoad/vim-jade'
Bundle 'zepto-lang/zepto-vim'
Bundle 'hellerve/carp-vim'
Bundle 'hellerve/luna-vim'
Bundle 'tikhomirov/vim-glsl'
Plugin 'rust-lang/rust.vim'

44
zshrc
View File

@@ -24,7 +24,7 @@ export GOPATH=~/.go
export GOBIN=$GOPATH/bin
export GHC_HOME=/usr/local/bin
export CABAL_HOME=$HOME/.cabal/
export PATH=$GHC_HOME:$PATH:$CABAL_HOME/bin:/opt/local/bin:/usr/local/sbin:/usr/local/opt/llvm/bin:$GOBIN
export PATH=$GHC_HOME:$PATH:$CABAL_HOME/bin:/opt/local/bin:/usr/local/sbin:/usr/local/opt/llvm/bin:~/.local/bin:$GOBIN
export MANPATH=$MANPATH:/opt/local/share/man:/usr/local/opt/erlang/lib/erlang/man
export INFOPATH=$INFOPATH:/opt/local/share/info
export PYTHONSTARTUP=~/.pythonrc
@@ -32,24 +32,19 @@ export NODE_PATH=/usr/local/lib/node_modules
export TERM=rxvt
export LANG=en_US.UTF-8
export LC_ALL=$LANG
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export JAVA_HOME=`/usr/libexec/java_home -v 9`
export GH_HOME=~/Documents/Code/Github
export CARP_DIR=$GH_HOME/Carp/
export EDITOR=vim
alias dob="git branch --merged | grep -vE '(\*)|(master)|(dev)' | xargs -n 1 git branch -d"
alias vi="stty stop '' -ixoff ; stty erase '^?'; vim"
alias gcc="gcc-7"
alias g++="g++-7"
alias increment_version="zepto ~/.scripts/vincr.zp"
alias mk="make"
alias psh="perl ~/.scripts/psh"
alias push="git push"
alias pull="git pull"
alias g="git"
alias virtualenv2="python2.7 /usr/local/lib/python2.7/site-packages/virtualenv.py"
alias pupgrade2="pip2.7 install --upgrade pip; python2.7 ~/.pip-upgrade 2"
alias pupgrade3="pip3 install --upgrade pip; python3 ~/.pip-upgrade 3"
alias pupgrade="pupgrade2 && pupgrade3"
alias cupgrade="cabal update; cabal list --simple-output --installed | awk '{print $1}' | uniq | sed 's/ .*$//' | xargs -I {} cabal install {} --reinstall"
alias ghci="ghci -v0"
alias ghc-sandbox="ghc -no-user-package-db -package-db .cabal-sandbox/*-packages.conf.d"
alias ghci-sandbox="ghci -no-user-package-db -package-db .cabal-sandbox/*-packages.conf.d"
@@ -57,21 +52,16 @@ alias runhaskell-sandbox="runhaskell -no-user-package-db -package-db .cabal-sand
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"
alias python="python3"
alias pysh="ipython"
alias pip2="/usr/local/bin/pip"
alias pip2="/usr/local/bin/pip2"
alias pip="pip3"
alias pypy="pypy3"
alias setjdk="launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk"
alias cdz="cd $GH_HOME/zepto"
alias cdg="cd $GH_HOME"
alias cdot="cd $GH_HOME/.dotfiles"
alias cdgo="cd ~/.go/src"
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
alias dud="du -d 1"
alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc-z.txt *"
alias lol="say lol -v Cellos"
alias loc="cloc --read-lang-def=/Users/veitheller/.scripts/cloc.txt *"
alias ls="ls -a"
alias quit="exit"
alias howmuch="git ls-tree -r -z --name-only HEAD -- . | xargs -0 -n1 git blame --line-porcelain HEAD | grep '^author '| sort | uniq -c | sort -nr"
alias clipboard_clear="echo lol | pbcopy"
alias tmv="tmux split-window"
alias tmh="tmux split-window -h"
@@ -148,16 +138,6 @@ RPROMPT='`rprompt-git-current-branch`'
RPROMPT+="%{$fg[white]%}in %{$fg_bold[yellow]%}%~%{$reset_color%}"
RPROMPT+='`cabal_sandbox_info`'
function ghc-pkg-reset() {
read 'ans?erasing all your user ghc and cabal packages - are you sure (y/n) ? '
if [[ "$ans" =~ ^[Yy]$ ]] ; then
echo 'erasing directories under ~/.ghc'; rm -rf `find ~/.ghc -maxdepth 1 -type d`; \
echo 'erasing ~/.cabal/lib'; rm -rf ~/.cabal/lib; \
# echo 'erasing ~/.cabal/packages'; rm -rf ~/.cabal/packages; \
# echo 'erasing ~/.cabal/share'; rm -rf ~/.cabal/share; \
fi
}
extract(){
if [ -f $1 ] ; then
case $1 in
@@ -217,7 +197,6 @@ save_dotfiles(){
cp ~/.inputrc ${DOTPATH}inputrc
cp ~/.pip-upgrade ${DOTPATH}pip-upgrade
cp ~/.pythonrc ${DOTPATH}pythonrc
cp ~/.sbclirc ${DOTPATH}sbclirc
cp ~/.tmux.conf ${DOTPATH}tmux.conf
cp ~/.valgrindrc ${DOTPATH}valgrindrc
cp ~/.vimrc ${DOTPATH}vimrc
@@ -246,18 +225,12 @@ upgrade () {
brew upgrade --all
brew cleanup
fi
pupgrade
cupgrade
}
function tree(){
find . | sed -e 's/[^\/]*\//|--/g' -e 's/-- |/ |/g' | $PAGER
}
function vig {
vi ~/Documents/Code/Github/$1
}
###-begin-npm-completion-###
#
# npm command completion script
@@ -316,12 +289,7 @@ function gclone {
git clone https://github.com/$1
}
function zeptosay () {
x=`fortune`
zepto ~/.scripts/zeptosay.zp $x
}
fortune | zeptosay
fortune | cowsay
eval `opam config env`