Permalink
Browse files

Add zsh auto-nagivation, and update the ackrc, inputrc, vimrc

  • Loading branch information...
1 parent b279349 commit aa08a347cdc86f62e9e718bd2851a33800f9990b @tienle committed Nov 8, 2011
Showing with 55 additions and 8 deletions.
  1. +16 −2 .ackrc
  2. +7 −0 .gemrc
  3. +4 −0 .gitconfig
  4. +3 −0 .inputrc
  5. +3 −0 .rdebugrc
  6. +4 −0 .vimrc
  7. +16 −6 .zshrc
  8. +2 −0 backup.sh
View
18 .ackrc
@@ -1,2 +1,16 @@
---type-add
-ruby=.sass,.haml,.feature,.sasc
+--type-add=ruby=.haml,.rake,.ru,.palette
+--type-add=html=.html.erb,.html.haml,.mustache,.jst
+--type-add=js=.js.erb
+--type-add=css=.sass,.less,.scss
+--type-set=markdown=.markdown,.md
+--type-set=cucumber=.feature
+--ignore-dir=vendor
+--ignore-dir=log
+--ignore-dir=tmp
+--ignore-dir=doc
+--ignore-dir=coverage
+--sort-files
+--color
+--follow
+--group
+--context=3
View
7 .gemrc
@@ -0,0 +1,7 @@
+ ---
+:backtrace: false
+gem: --no-ri --no-rdoc
+:benchmark: false
+:update_sources: true
+:verbose: true
+:bulk_threshold: 1000
View
@@ -10,6 +10,10 @@
logl = log --pretty=oneline --abbrev-commit --color
dc = diff --cached
ws = diff --check
+ l50 = "!git log --abbrev-commit --date=short --pretty=format:'%x00%h%x00%cd%x00%s%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-50s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, $3, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$4), $5, $6 }' | less -R"
+ l80 = "!git log --abbrev-commit --date=short --pretty=format:'%x00%h%x00%cd%x00%s%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-80s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, $3, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$4), $5, $6 }' | less -R"
+ lg50 = "!git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
+ lg80 = "!git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-80s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
[color]
diff = auto
status = auto
View
@@ -1 +1,4 @@
+set -o vi
set editing-mode vi
+set keymap vi
+set convert-meta on
View
@@ -0,0 +1,3 @@
+set autolist
+set autoeval
+set autoreload
View
4 .vimrc
@@ -124,6 +124,8 @@ map <F7> :cn<CR>
"map <C-j> <C-w>j
"map <C-k> <C-w>k
"map <C-l> <C-w>l
+nnoremap <C-H> ^
+nnoremap <C-L> $
map <M-J> :m +1 <CR>
map <M-K> :m -2 <CR>
@@ -217,6 +219,8 @@ let tlist_sql_settings = 'sql;P:package;t:table'
let tlist_ant_settings = 'ant;p:Project;r:Property;t:Target'
"let Tlist_Ctags_Cmd = $VIM.'/vimfiles/ctags.exe' " location of ctags tool
set tags=tags;/
+let g:rails_ctags_arguments = "`gem env gemdir`/gems"
+
"auto update ctags after file was saved
au BufWritePost .rb,.c,.cpp,*.h silent! !ctags -R &
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
View
22 .zshrc
@@ -2,8 +2,18 @@
# jdong's zshrc file v0.2.1 , based on:
# mako's zshrc file, v0.1
#
-#
+#
######################################################################
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
+cdpath=(. $HOME/code $HOME/fun )
+
+current() {
+ if [[ -f $CURRENT_PROJECT_PATH ]]; then
+ cd "$(cat $CURRENT_PROJECT_PATH)"
+ fi
+}
+
+current
# next lets set some enviromental/shell pref stuff up
# setopt NOHUP
@@ -25,7 +35,7 @@ setopt ALL_EXPORT
# Set/unset shell options
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs
-setopt autoresume histignoredups pushdsilent
+setopt autoresume histignoredups pushdsilent
setopt autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash
@@ -82,7 +92,7 @@ alias hnb-partecs='hnb $HOME/partecs/partecs-hnb.xml'
alias rest2html-css='rst2html --embed-stylesheet --stylesheet-path=/usr/share/python-docutils/s5_html/themes/default/print.css'
#if [[ $HOSTNAME == "kamna" ]] {
# alias emacs='emacs -l ~/.emacs.kamna'
-#}
+#}
# alias =clear
@@ -134,7 +144,7 @@ zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
# allow one error for every three characters typed in approximate completer
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'
-
+
# insert all expansions for expand completer
zstyle ':completion:*:expand:*' tag-order all-expansions
@@ -161,14 +171,14 @@ zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
#zstyle ':completion:*:processes' command 'ps ax -o pid,s,nice,stime,args | sed "/ps/d"'
zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
-zstyle ':completion:*:processes-names' command 'ps axho command'
+zstyle ':completion:*:processes-names' command 'ps axho command'
#zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
#
#NEW completion:
# 1. All /etc/hosts hostnames are in autocomplete
# 2. If you have a comment in /etc/hosts like #%foobar.domain,
# then foobar.domain will show up in autocomplete!
-zstyle ':completion:*' hosts $(awk '/^[^#]/ {print $2 $3" "$4" "$5}' /etc/hosts | grep -v ip6- && grep "^#%" /etc/hosts | awk -F% '{print $2}')
+zstyle ':completion:*' hosts $(awk '/^[^#]/ {print $2 $3" "$4" "$5}' /etc/hosts | grep -v ip6- && grep "^#%" /etc/hosts | awk -F% '{print $2}')
# Filename suffixes to ignore during completion (except after rm command)
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' \
'*?.old' '*?.pro'
View
@@ -7,6 +7,8 @@ cp ~/.autotest .
cp ~/.ackrc .
cp ~/.inputrc .
cp ~/.zshrc .
+cp ~/.gemrc .
+cp ~/.rdebugrc .
cp -R ~/.vim/ .
git status

0 comments on commit aa08a34

Please sign in to comment.