Merge remote-tracking branch 'origin/master' into everard

Conflicts:
	zsh/bundle/oh-my-zilsh
This commit is contained in:
Thomas Ruoff
2014-08-11 17:55:54 +02:00
8 changed files with 49 additions and 166 deletions

9
.gitmodules vendored
View File

@@ -1,9 +1,6 @@
[submodule "zsh/zilsh"]
path = zsh/zilsh
url = git@github.com:zilsh/zilsh.git
[submodule "zsh/bundle/oh-my-zilsh"]
path = zsh/bundle/oh-my-zilsh
url = git@github.com:zilsh/oh-my-zilsh.git
[submodule "vim/bundle/Vundle.vim"]
path = vim/bundle/Vundle.vim
url = https://github.com/gmarik/Vundle.vim.git
[submodule "oh-my-zsh"]
path = oh-my-zsh
url = git@github.com:robbyrussell/oh-my-zsh.git

1
oh-my-zsh Submodule

Submodule oh-my-zsh added at 1b7a3ea99a

82
vimrc
View File

@@ -2,6 +2,7 @@
set nocompatible
" Vundle
filetype off " required!
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
@@ -17,6 +18,8 @@ Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'maxbrunsfeld/vim-yankstack', {'name': 'yankstack'}
Plugin 'surround.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'pangloss/vim-javascript'
@@ -34,6 +37,7 @@ Plugin 'snipMate'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'mhinz/vim-startify'
" All of your Plugins must be added before the following line
call vundle#end() " required
@@ -44,12 +48,7 @@ filetype plugin indent on " required
set t_Co=256
" MAP LEADER
noremap , \
let mapleader = ","
" CONFIGURATION MAPPING
set scrolloff=3 " show 3 lines of context around the cursor
set autoread " set to auto read when a file is changed from the outside
"set mouse=a " allow for full mouse support
set autowrite
@@ -105,7 +104,6 @@ endif
" VIM 7.3 FEATURES
if v:version >= 703
set undofile
set undodir=$HOME/.vim/.undo
@@ -123,7 +121,12 @@ set foldenable " enable folding
set foldmethod=marker " detect triple-{ style fold markers
set foldlevel=99
" ADDITIONAL KEY MAPPINGS
" KEY MAPPINGS
" MAP LEADER
noremap , \
let mapleader = ","
" fast saving
nmap <leader>w :update<cr>
" fast escaping
@@ -141,9 +144,9 @@ nmap gy ggVGy
nnoremap j gj
nnoremap k gk
" auto complete {} indent and position the cursor in the middle line
inoremap {<CR> {<CR>}<Esc>O
inoremap (<CR> (<CR>)<Esc>O
inoremap [<CR> [<CR>]<Esc>O
"inoremap {<CR> {<CR>}<Esc>O
"inoremap (<CR> (<CR>)<Esc>O
"inoremap [<CR> [<CR>]<Esc>O
" fast window switching
map <leader>, <C-W>w
" cycle between buffers
@@ -151,11 +154,13 @@ map <leader>. :b#<cr>
" change directory to current buffer
map <leader>cd :cd %:p:h<cr>
" swap implementations of ` and ' jump to prefer row and column jumping
nnoremap ' `
nnoremap ` '
" nnoremap ' `
" nnoremap ` '
" indent visual selected code without unselecting and going back to normal mode
vmap > >gv
vmap < <gv
" Visually select the text that was last edited/pasted
nmap gV `[v`]
" pull word under cursor into lhs of a substitute (for quick search and replace)
nmap <leader>r :%s#\<<C-r>=expand("<cword>")<CR>\>#
" strip all trailing whitespace in the current file
@@ -181,13 +186,21 @@ nmap <silent> <leader>nn :set invnumber<CR>
nmap <silent> <leader>pp :set invpaste<CR>
nmap <silent> <leader>ii :set invrelativenumber<CR>
" remap [] to <> for german keyboard
nmap < [
nmap > ]
omap < [
omap > ]
xmap < [
xmap > ]
" accomondate with german keyboard
nnoremap ß <C-]>
nnoremap Ä }
nnoremap Ö {
nnoremap ä ]
nnoremap ö [
"nnoremap ß <C-]>
"nnoremap Ä }
"nnoremap Ö {
"nnoremap ä ]
"nnoremap ö [
if exists('+relativenumber')
set relativenumber
@@ -196,31 +209,10 @@ endif
"" ADDITIONAL AUTOCOMMANDS
" saving when focus lost (after tabbing away or switching buffers)
au FocusLost,BufLeave,WinLeave,TabLeave * silent! up
"au FocusLost,BufLeave,WinLeave,TabLeave * silent! up
" open in last edit place
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
au QuickFixCmdPost *grep* cwindow
"" ADDITIONAL GUI SETTINGS
if has("gui_running")
set guioptions-=T
" set guioptions-=m
set linespace=6
set columns=160 lines=26
set guioptions-=T
" crazy hack to get gvim to remove all scrollbars
set guioptions+=LlRrb
set guioptions-=LlRrb
if has("mac")
set guifont=DejaVu\ Sans\ Mono\:h14
else
set guifont=DejaVu\ Sans\ Mono\ 9
endif
endif
"au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
"au QuickFixCmdPost *grep* cwindow
"" PLUGIN SETTINGS
@@ -231,9 +223,6 @@ let g:NERDTreeDirArrows=1
let g:NERDTreeQuitOnOpen=1
let g:NERDTreeShowHidden=1
" Super Tab
" let g:SuperTabDefaultCompletionType = "context"
" Unimpaired
" bubble single lines
nmap <leader>k [e
@@ -246,12 +235,13 @@ vmap <leader>j ]egv
nmap <leader>p <Plug>yankstack_substitute_older_paste
nmap <leader>P <Plug>yankstack_substitute_newer_paste
" FILETYPE SPECIFIC
" MAIL HUMAN TEX
au BufNewFile,BufRead *.txt set filetype=human
au FileType human,mail,tex set expandtab textwidth=78 nocindent
"" LANGUAGE SPECIFIC
" Python
au FileType python set noexpandtab

View File

@@ -1,40 +0,0 @@
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi

View File

@@ -1,53 +0,0 @@
###-begin-npm-completion-###
#
# npm command completion script
#
# Installation: npm completion >> ~/.bashrc (or ~/.zshrc)
# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm
#
COMP_WORDBREAKS=${COMP_WORDBREAKS/=/}
COMP_WORDBREAKS=${COMP_WORDBREAKS/@/}
export COMP_WORDBREAKS
if type complete &>/dev/null; then
_npm_completion () {
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
npm completion -- "${COMP_WORDS[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -F _npm_completion npm
elif type compdef &>/dev/null; then
_npm_completion() {
si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
}
compdef _npm_completion npm
elif type compctl &>/dev/null; then
_npm_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K _npm_completion npm
fi
###-end-npm-completion-###

Submodule zsh/zilsh deleted from 7b1881de4b

28
zshrc
View File

@@ -1,35 +1,25 @@
ZILSH_VERBOSITY=2
export ZSH=$HOME/.oh-my-zsh
autoload -U colors && colors
source ~/.zsh/zilsh/zilsh.zsh
ZSH_THEME="pygmalion"
# oh-my-zilch config
#
omz_plugins=(bower gitfast git-extras node npm pass screen vi-mode)
plugins=(bower gitfast git-extras node npm pass screen vi-mode)
case $(hostname) in
t430s-arch)
omz_plugins+=(archlinux systemd)
plugins+=(archlinux systemd)
;;
cassiopeia.uberspace.de)
omz_plugins+=()
plugins+=()
;;
everard)
omz_plugins+=(debian jira)
plugins+=(debian jira)
;;
esac
source $ZSH/oh-my-zsh.sh
ZILSH_THEME="pygmalion.zsh-theme"
_zilsh_init "~/.zsh/bundle/"
############
## Settings
#############
PATH="$PATH:$HOME/local/bin"
EDITOR="vim"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# turn of autocorrection
unsetopt correct_all