From d55a1c24af98dc51263bc04f9d08ce2bcfd5722b Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 29 Aug 2012 02:34:34 +0200 Subject: [PATCH] Various updates for apple --- config/zsh/20_environment | 9 +++++++-- config/zsh/50_aliases | 5 +++++ gitconfig | 15 ++++----------- ssh/config | 31 +++---------------------------- vim/syntax/c.vim | 1 + vimrc | 9 +++------ 6 files changed, 23 insertions(+), 47 deletions(-) diff --git a/config/zsh/20_environment b/config/zsh/20_environment index 8c1e026..bc2958a 100644 --- a/config/zsh/20_environment +++ b/config/zsh/20_environment @@ -19,7 +19,6 @@ export RLWRAP_HOME="$HOME/.cache/rlwrap/" export GTK_IM_MODULE=xim export BROWSER=chromium-browser -export PYTHONPATH=/home/madcoder/local/lib/python/ export LC_MESSAGES=C unset LC_ALL @@ -33,7 +32,13 @@ else ;; *) PATH="/usr/lib/ccache:${HOME}/local/bin:${HOME}/bin:${PATH}" - LD_LIBRARY_PATH="${HOME}/local/lib" + case $(uname) in + Darwin) + ;; + *) + LD_LIBRARY_PATH="${HOME}/local/lib" + ;; + esac ;; esac fi diff --git a/config/zsh/50_aliases b/config/zsh/50_aliases index 9d0909f..5665d8d 100644 --- a/config/zsh/50_aliases +++ b/config/zsh/50_aliases @@ -43,3 +43,8 @@ alias v=vim cvi () { vim -O ${${1%.[hc]}%.}.{h,c} } + +if [ -n "$g" ]; then + alias find=gfind + alias sed=gsed +fi diff --git a/gitconfig b/gitconfig index 65fb164..4914567 100644 --- a/gitconfig +++ b/gitconfig @@ -3,27 +3,20 @@ [alias] co=checkout -m - ci=commit -s + ci=commit st=!git -p status pop=reset HEAD~1 unstash=stash apply - amend=commit -s --amend - squash=commit -s --amend -C HEAD - debtag=!git tag -f -a -s -m `git-symbolic-ref HEAD | sed -e 's~refs/heads/~~'`/`dpkg-parsechangelog | sed -n 's/^Version: \\(.*:\\)\\?//p'` `git-symbolic-ref HEAD | sed -e 's~refs/heads/~~'`/`dpkg-parsechangelog | sed -n 's/^Version: \\(.*:\\)\\?//p'` - b64=commit -sm'64bits fix' - send=send-email --no-chain-reply-to --suppress-cc all --suppress-from --no-signed-off-by-cc --annotate --compose -C -C -M --patience --to - is-send=send-email --no-chain-reply-to --suppress-cc all --suppress-from --no-signed-off-by-cc --annotate --compose --patience -C -C -M --to corp.software.review@news.intersec.com + amend=commit --amend + squash=commit --amend -C HEAD unstage=reset HEAD -- track=add -N untrack=rm --cached -[merge] - tool=diffuse - [core] #editor=gvim -f editor=vim - excludesfile=/home/madcoder/.git-excludes + excludesfile=~madcoder/.git-excludes preloadindex=true [notes] diff --git a/ssh/config b/ssh/config index 2068249..8901416 100644 --- a/ssh/config +++ b/ssh/config @@ -5,37 +5,12 @@ Compression yes ControlPersist 30 VerifyHostKeyDNS yes +Host *.apple.com + User phabouzit + Host *.inria.fr User habouzit -Host *.corp - ForwardAgent yes - -#--- intersec --- -Host demo-sfr - Hostname localhost - Port 2222 - User intersec - -Host *.intersec.com - Port 2222 - User madcoder - -Host beacon - Hostname beacon.intersec.eu - Port 2222 - User madcoder - -Host rudy - HostName rudy.intersec.com - Port 2222 - User madcoder - -Host rood - HostName rood.intersec.com - Port 2222 - User madcoder - #--- madism --- Host hephaistos User root diff --git a/vim/syntax/c.vim b/vim/syntax/c.vim index 41ac4ad..85b3a65 100644 --- a/vim/syntax/c.vim +++ b/vim/syntax/c.vim @@ -6,6 +6,7 @@ syn keyword cStatement p_dup p_dupstr p_dupz syn keyword isGlobal _G syn match isGlobal "\<[a-zA-Z_][a-zA-Z0-9_]*_g\>" +syn match isGlobal "\<[gs][A-Z][a-zA-Z0-9_]*\>" syn keyword cType byte syn match cFunction "\<\([a-z][a-zA-Z0-9_]*\|[a-zA-Z_][a-zA-Z0-9_]*[a-z][a-zA-Z0-9_]*\)\> *("me=e-1 diff --git a/vimrc b/vimrc index ffd0d5f..61c93a3 100644 --- a/vimrc +++ b/vimrc @@ -92,9 +92,9 @@ set complete-=k complete+=k set tags=tags;/,.tags;/,TAGS;/ set cinoptions= -set cinoptions+=L0.5s " align labels at 0.5 shiftwidth -set cinoptions+=:0.5s,=0.5s " same for case labels and code following a label -set cinoptions+=g0.5s,h0.5s " same for c++ stuff +set cinoptions+=Ls " align labels at 0 shiftwidth +set cinoptions+=:0,=1s " same for case labels +"set cinoptions+=g0.5s,h0.5s " same for c++ stuff set cinoptions+=t0 " type on the line before the functions is not idented set cinoptions+=(0,Ws " indent in functions ( ... ) when it breaks set cinoptions+=m1 " aligh the closing ) properly @@ -104,9 +104,6 @@ set cinoptions+=j1 " java/javscript -> fixes blocks set diffopt=filler,context:5,iwhite set fillchars+=diff:\ ,vert:│ -set makeprg=LC_ALL=C\ make\ MONOCHROME=1 -set grepprg=egrep\ --exclude='*.blk.c'\ --exclude='*.blkk.cc'\ -n\ $*\ /dev/null - exe "set path=." . system("echo | cpp -v 2>&1 | grep '^ .*/include' | tr -d \"\n\" | tr \" \" \",\"") set path+=.;/ -- 2.20.1