diff options
-rw-r--r-- | dot_bashrc | 59 | ||||
-rw-r--r-- | dot_vimrc | 41 | ||||
-rw-r--r-- | dot_zshrc | 21 |
3 files changed, 110 insertions, 11 deletions
diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..9b85a4e --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,59 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +complete -cf sudo +complete -cf man +shopt -s autocd + +alias ls='ls --color=auto' +alias df='dfc' +PS1='[\u@\h \W]\$ ' + +export EDITOR='vim' + +export GOPATH=$HOME/go + +export PATH=$PATH:$HOME/usr/bin:$HOME/go/bin +export LD_LIBRARY_PATH=$HOME/usr/lib + +# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' + +export WINEARCH=win32 + +# -- GIT prompt +GIT_PROMPT_FETCH_REMOTE_STATUS=0 +GIT_PROMPT_START="\n\[\033[0m\][\$(if [[ \$? == 0 ]]; then echo \"\[\033[0;32m\]\$?\"; else echo \"\[\033[0;31m\]\$?\"; fi)\[\033[00m\]] \[\033[0;36m\]\u@\h \[\033[0;33m\]\w\[\033[0m\]" +GIT_PROMPT_END="\[\033[0m\]\n \$ " +source ~/usr/src/bash-git-prompt/gitprompt.sh + + +# ------------ GOOGLE CLOUD SDK +# The next line updates PATH for the Google Cloud SDK. +source /home/katchup/usr/google-cloud-sdk/path.bash.inc +# The next line enables bash completion for gcloud. +source /home/katchup/usr/google-cloud-sdk/completion.bash.inc + +# ------------ OPAM configuration +. /home/katchup/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true +export PATH=$PATH:$HOME/usr/google-cloud-sdk/bin:$HOME/.opam/system/bin + + +export SDL_VIDEO_X11_DGAMOUSE=0 + + +alias clipper='ssh -R 9876:localhost:9872 auvolat@sas.eleves.ens.fr' +alias cargo='ssh auvolat@cargo.ens.fr' +alias tremble='ssh auvolat@tremble.ens.fr' +alias tulipier='ssh auvolat@tulipier.ens.fr' +# conseil : utiliser tulipier pour bosser, sas.eleves pour IRC + +alias vps='ssh katchup@vps46149.ovh.net' +alias irc='ssh -t adnab.me irc' + +alias ocamltop='rlwrap ocaml "$@"' + +expand -t 4 $HOME/Core/TODO @@ -1,16 +1,16 @@ set ts=4 set sw=4 -set expandtab -set sts=4 -autocmd FileType make setlocal noexpandtab +" autocmd FileType make setlocal noexpandtab +let mapleader="," -" Mini tabs, small "m": -map \m <Esc>:set expandtab ts=2 sw=2 sts=2<CR> +" Tab modes. +map <leader>m <Esc>:set expandtab ts=2 sw=2 sts=2<CR> +map <leader>t <Esc>:set noexpandtab ts=4 sw=4<CR> +map <leader>T <Esc>:set expandtab ts=4 sw=4 sts=4<CR> -" Think "little tabs" and "big tabs": -map \t <Esc>:set expandtab ts=4 sw=4 sts=4<CR> -map \T <Esc>:set expandtab ts=8 sw=8 sts=4<CR> +" Folds: +map <leader>f <Esc>:set fen fdn=3 fdm=indent fml=1 fdc=3<CR> set hlsearch @@ -24,5 +24,30 @@ set term=xterm-256color set cursorline hi CursorLine cterm=bold ctermbg=0 +hi Folded ctermfg=2 ctermbg=0 +hi FoldColumn ctermfg=2 ctermbg=0 +let g:sclangTerm = "urxvt -e" +autocmd FileType tex setlocal spell spelllang=fr +highlight SpellBad ctermfg=red ctermbg=none + +let NERDTreeIgnore=['\.o$', '\.cmo$', '\.cmx$', '\.cmi$'] + +set wildmode=list:longest + +au BufRead,BufNewFile *.md set filetype=markdown +au BufRead,BufNewFile *.lus set filetype=lustre +au BufRead,BufNewFile *.scade set filetype=scade + + +" Append modeline after last line in buffer. +" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX +" files. +function! AppendModeline() + let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d %set :", + \ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no') + let l:modeline = substitute(&commentstring, "%s", l:modeline, "") + call append(line("$"), l:modeline) +endfunction +nnoremap <silent> <Leader>ml :call AppendModeline()<CR> @@ -56,19 +56,34 @@ alias ls='ls --color=auto' export EDITOR=vim export GOPATH=$HOME/go -export PATH=$PATH:$HOME/usr/bin +export PATH=$PATH:$HOME/usr/bin:$HOME/go/bin export LD_LIBRARY_PATH=$HOME/usr/lib export WINEARCH=win32 -alias clipper='ssh auvolat@sas.eleves.ens.fr' +alias clipper='ssh -R 9876:localhost:9872 auvolat@sas.eleves.ens.fr' alias cargo='ssh auvolat@cargo.ens.fr' alias tremble='ssh auvolat@tremble.ens.fr' alias tulipier='ssh auvolat@tulipier.ens.fr' # conseil : utiliser tulipier pour bosser, sas.eleves pour IRC +alias vps='ssh katchup@vps46149.ovh.net' +alias irc='ssh -t -R 9872:localhost:9872 adnab.me irc' + +alias ocamltop='rlwrap ocaml "$@"' + # TADA -expand -t 4 $HOME/TODO +expand -t 4 $HOME/Core/TODO + + + +export CLOUDSDK_PYTHON=/usr/bin/python2 +export PATH=$PATH:$HOME/usr/google-cloud-sdk/bin +source $HOME/usr/google-cloud-sdk/completion.zsh.inc +# OPAM configuration +. /home/katchup/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true +export PATH=$PATH:$HOME/usr/google-cloud-sdk/bin:$HOME/.opam/system/bin +export SDL_VIDEO_X11_DGAMOUSE=0 |