Now using ZSH with oh-my-zsh, better ackrc, removed bash-stuff, updated submodules

main
Steffen Becker 12 years ago
parent 72e3f2c9de
commit 2ec22ee636

3
.gitmodules vendored

@ -121,3 +121,6 @@
[submodule "vim/bundle/editorconfig"]
path = vim/bundle/editorconfig
url = git://github.com/editorconfig/editorconfig-vim.git
[submodule "oh-my-zsh"]
path = oh-my-zsh
url = git@github.com:nebelschwade/oh-my-zsh.git

@ -0,0 +1,71 @@
/*global desc: true*/
/*global task: true*/
/*global jake: true*/
/*global namespace: true*/
/*global console: true*/
/*global exec: true*/
desc('Default task');
task('default', [], function(params) {
jake.Task['setup:link'].invoke();
jake.Task['setup:submodules'].invoke();
});
namespace('setup', function() {
desc('Links files and dirs to your home directory');
task('link', [], function(params) {
console.log('Linking files and dirs to your home directory...');
var cmds = [
'ln -s ~/Dotfiles/vim ~/.vim',
'ln -s ~/Dotfiles/oh-my-zsh ~/.oh-my-zsh',
'ln -s ~/Dotfiles/ackrc ~/.ackrc',
'ln -s ~/Dotfiles/gitconfig ~/.gitconfig',
'ln -s ~/Dotfiles/gitignore ~/.gitignore',
'ln -s ~/Dotfiles/hgignore_global ~/.hgignore_global',
'ln -s ~/Dotfiles/jshintrc ~/.jshintrc',
'ln -s ~/Dotfiles/pearrc ~/.pearrc',
'ln -s ~/Dotfiles/vimrc ~/.vimrc',
'ln -s ~/Dotfiles/zshrc ~/.zshrc'
];
jake.exec(cmds, function() {
console.log('Linking complete.');
}, { printStdout: true } );
});
desc('Inits and updates the submodules');
task('submodules', [], function(params) {
console.log('Initializing and updating the git submodules...');
var cmds = [
'git submodule init',
'git submodule update',
'git submodule foreach git checkout master',
'git submodule foreach git pull'
];
jake.exec(cmds, function() {
console.log('Submodules complete.');
}, { printStdout: true } );
});
});
desc('Activate zsh');
task('zsh', [], function() {
console.log('Activating ZSH...');
var cmds = [
'chsh -s `which zsh`',
'/usr/bin/env zsh',
'source ~/.zshrc'
];
jake.exec(cmds, function() {
console.log('ZSH activated.');
});
});

@ -1,27 +1,24 @@
# My dotfiles
This is a collection of my dotfiles. To install on your local machine run the following commands:
This is a collection of my dotfiles. Requirements are:
installed and working homebrew with installed node, npm
and the node jake-plugin. And zsh :-)
```
git clone git://github.com/nebelschwade/Dotfiles ~/Dotfiles
cd ~/Dotfiles
ln -s ~/Dotfiles/vim ~/.vim
ln -s ~/Dotfiles/gitconfig ~/.gitconfig
ln -s ~/Dotfiles/gitignore ~/.gitignore
ln -s ~/Dotfiles/hgignore_global ~/.hgignore_global
ln -s ~/Dotfiles/inputrc ~/.inputrc
ln -s ~/Dotfiles/jshintrc ~/.jshintrc
ln -s ~/Dotfiles/pearrc ~/.pearrc
ln -s ~/Dotfiles/profile ~/.profile
ln -s ~/Dotfiles/pearrc ~/.pearrc
ln -s ~/Dotfiles/vimrc ~/.vimrc
git submodule init
git submodule update
git submodule foreach git checkout master
git submodule foreach git pull
jake
```
Then create a file `.gitconfig.user` in your home-folder and provide your git credentials, such as:
Restart your terminal and type
```
cd ~/Dotfiles
jake zsh
```
Now change the file `.gitconfig.user` in your home-folder and
provide your git credentials, such as:
```
[user]
@ -32,7 +29,12 @@ Then create a file `.gitconfig.user` in your home-folder and provide your git cr
token = 1235687641287364
```
Restart your terminal and vim, and you are ready to go.
Finally restart your terminal and vim again, and you are ready to go.
## oh-my-zsh
I use the famous oh-my-zsh framework with a custom theme.
Have a look at the zshrc-file for custom aliases and functions.
## VIM
@ -44,13 +46,14 @@ Restart your terminal and vim, and you are ready to go.
- buffergator
- ctrlp
- easymotion
- editorconfig
- fugitive
- gist (more config needed, see github page)
- indent-guides
- indent-object
- matchit
- nrrwrgn
- nerdtree
- nrrwrgn
- pasta
- ragtag
- repeat
@ -94,6 +97,7 @@ Restart your terminal and vim, and you are ready to go.
- ,v for a new vertical split
- ,= for resizing splits equally
- ,a for Ack-Search
- ,f for search and replace
- ,/ for un/commenting
- ,z for zoomin
- ,r for browser-refreshing-
@ -106,7 +110,3 @@ Restart your terminal and vim, and you are ready to go.
- \<F8\> for toggling the tagbar
- \<shift-tab\> in css indents single line to column 31
- autotrailing of whitespace for php, html, css, js, ts, xml, json, inc and vim files
## Bash and aliases
Well, have a look at .profile.

18
ackrc

@ -1,4 +1,14 @@
--type-add
html=.haml
--type-add
css=.css,.sass,.scss
# only search with case sensitivity if there is mixed case
--smart-case
# follow symlinks
--follow
# add additional often used types
--type-add=html=.haml
--type-add=css=.sass,.scss,.less
# add default most searched files set
--type-set=dev=.php,.scss,.html,.xml,.js,.ts,.rb
--type-set=plaintext=.txt,.md,.markdown
--type-set=typoscript=.,ts

@ -1,4 +0,0 @@
set completion-ignore-case on
set completion-query-items -1
set page-completions off

@ -0,0 +1 @@
Subproject commit 7d4e41ffcf0e89e9248ef5b4c21f392ecd957cbf

@ -1 +1 @@
Subproject commit 6ddbfe2cc00a7eeb2a4450552b78276488a2e2c9
Subproject commit b7cb2f539d6f14443ccff7c3fa14da9049bcaab0

@ -1 +1 @@
Subproject commit 0abe1fb12232abe5b7bdfa4d244f04faf3450ba3
Subproject commit f5b50f822bad212b18be5d7e2717006a70991995

@ -1 +1 @@
Subproject commit 827c47c10b8ce97fc8982329e4236584e73826cf
Subproject commit 395f8901b34cc871c9576886938a6efda0eb7268

@ -1 +1 @@
Subproject commit d1bfbc589944fcb84af887aec79074d80a327f4c
Subproject commit a1b611ab22745f8b877d8de4f09985a0ddf3acfd

@ -1 +1 @@
Subproject commit 9e0c7fde4c7e555d88063367a735dac191220a6c
Subproject commit 698e0c333c1edae8a1d83b04e5674efa7cac3137

@ -1 +1 @@
Subproject commit d75a544b786710705f0db0d8d8fd66ca4a5a7239
Subproject commit 613eb1c81261adfa5dead315089c432ff6dbbc51

@ -1 +1 @@
Subproject commit 07ceacdd49a5bab9f27279ed89550da1927ad3c6
Subproject commit c53062315760bd02e8a6494283142c9b47e8ec43

@ -1 +1 @@
Subproject commit 9470786a69ae7735e48e22e19a81df4b739557c9
Subproject commit be0a20337546f66fafa27ac6a50c437fa5837809

@ -1 +1 @@
Subproject commit bff765b957b44988975565272eb4f6359543b4ec
Subproject commit 45697796012866ceda4dd0ef1b66e4c8a0e74546

@ -1 +1 @@
Subproject commit 70da9742b147a4a5ed77217a4604f23ec4736898
Subproject commit ba7fb09ce698116071aef7caed495ddd83f68f10

@ -1 +1 @@
Subproject commit 9da4cabb970384eb8f0476799c748ea2b43c9b46
Subproject commit 862fa8205f2ec8d9afb2ed86772b4e3fe6e530ca

@ -0,0 +1 @@
/Users/nebelschwade/Dotfiles/vim

@ -242,8 +242,8 @@ let g:ctrlp_map = '<leader>t'
let g:ctrlp_working_path_mode = 0
let g:ctrlp_max_height = 12
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|\.sass-cache$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.psd$\|\.png$\|\.jpg$\|\.gif#',
\ 'dir': '\v[\/](\.git|\.hg|\.svn|\.sass-cache)$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.psd$\|\.png$\|\.jpg$\|\.gif$',
\ }
" easier split screens

@ -1,25 +1,11 @@
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/.rvm/bin:$PATH
export MANPATH=/usr/local/share/man:$MANPATH
# disable stupid ._ and dsstore files
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
# colors ftw!
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# editor
export EDITOR=mvim
VISUAL=$EDITOR;
export VISUAL
# node.js
export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH
# aliases for starting apache and mysql
alias apachestart='sudo /usr/sbin/apachectl start'
alias apachestop='sudo /usr/sbin/apachectl stop'
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="webgefrickel"
### aliases ##
# aliases for apache and mysql
alias apachestart='_ /usr/sbin/apachectl start'
alias apachestop='_ /usr/sbin/apachectl stop'
alias mysqlstart='mysql.server start'
alias mysqlstop='mysql.server stop'
alias dev='apachestart && mysqlstart'
@ -29,60 +15,74 @@ alias devs='apachestop && mysqlstop'
alias virt='cd /usr/local/Cellar/virtuoso/6.1.5/var/lib/virtuoso/db/ && virtuoso-t -df'
# dnsflush-shortcut
alias dnsflush='sudo dscacheutil -flushcache'
alias dnsflush='_ dscacheutil -flushcache'
# all in one homebrew, gem and vim bundles update commands
alias dotup='cd ~/Dotfiles/ && git pull && cd -'
alias dotsubup='cd ~/Dotfiles/ && git submodule foreach git pull && cd -'
alias brewup='brew update && brew upgrade && brew cleanup && brew linkapps'
alias vimup='cd ~/Dotfiles/ && git submodule foreach git pull && cd -'
alias gemup='gem update --system && gem update'
alias gemup='gem update --system && gem update && gem cleanup'
alias npmup='npm -g cache clean && npm -g update'
alias upall='brewup && gemup && npmup && vimup'
# easy hosts-editing
alias hosts='sudo mvim /etc/hosts'
alias vhosts='sudo mvim /etc/apache2/extra/httpd-vhosts.conf'
alias rvmup='rvm get latest'
alias upall='brewup && rvmup && gemup && npmup && dotup && dotsubup'
# Always list everything
alias ls='ls -all'
alias lsd='ls -l | grep "^d"'
# dont autocorrect the following zsh-stuff
alias jake='nocorrect jake'
# always use mvim
alias vim='mvim'
alias v='mvim'
alias vim='mvim'
alias vd='mvimdiff'
alias diff='mvimdiff'
alias emptytrash='sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl'
# easy hosts-editing
alias hosts='_ v /etc/hosts'
alias vhosts='_ v /etc/apache2/extra/httpd-vhosts.conf'
# Easier navigation: .., ..., ~ and -
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# Shortcuts
alias dr='cd ~/Dropbox && ls'
alias w='cd ~/Sites && ls'
alias r='cd ~/Repositories && ls'
alias d='cd ~/Dotfiles && ls'
alias drop='cd ~/Dropbox && l'
alias web='cd ~/Sites && l'
alias rep='cd ~/Repositories && l'
alias dot='cd ~/Dotfiles && l'
# Gitty gitgit
alias gti='git'
alias g='git'
alias grm='git rm $(git ls-files --deleted)'
alias gitrm='git rm $(git ls-files --deleted)'
# dandelion deployment shortcuts
alias deploy='dandelion deploy'
alias status='dandelion status'
alias gw='grunt watch'
# custom bash with current git branch
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " *"
}
# grunt
alias grw='grunt watch'
alias grd='grunt deploy'
# default plugins to load
plugins=(brew git npm node gem osx)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"
}
source $ZSH/oh-my-zsh.sh
# paths
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/.rvm/bin:$PATH
export MANPATH=/usr/local/share/man:$MANPATH
export PS1='[\u \[\033[1;34m\]\w\[\033[0;33m\] $(parse_git_branch)\[\033[00m\]]$ '
# disable stupid ._ and dsstore files
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
# editor
export EDITOR=mvim
VISUAL=$EDITOR;
export VISUAL
# node.js
export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH
### some custom functions ###
# use ffmpeg to create nice web-videos and a jpg-still
ffencode () {
ffmpeg -i $1 -vcodec libx264 -vprofile high -preset slow -vb 1000k -maxrate 1000k -bufsize 2000k -vf scale="854:trunc(ow/a/2)*2" -threads 0 -ab 128k video-low.mp4;
@ -97,4 +97,3 @@ ffencode () {
# rvm ftw!
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Loading…
Cancel
Save