diff --git a/.bashrc b/.bashrc index a5c624c..345344d 100644 --- a/.bashrc +++ b/.bashrc @@ -57,9 +57,38 @@ if [ -n "$force_color_prompt" ]; then fi hg_ps1() { - #hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null - hg prompt " \[\033[1;37m\]hg\[\033[0m\] {branch}{status}" 2> /dev/null - } + #hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null + hg prompt " \[\033[1;37m\]hg\[\033[0m\] {branch}{status}" 2> /dev/null +} + +set_bash_prompt(){ + # Michiel's colour config + BLACK="\[\033[0m\]" + BLUE="\[\033[0;34m\]" + YELLOW="\[\033[0;33m\]" + GREEN="\[\033[0;32m\]" + RED="\[\033[0;31m\]" + PROMPT_SYMBOL='$' + if [ $USER = 'root' ]; then + #PS1="$YELLOW\t $RED\u$BLACK@\h:\W# " + PS1="$YELLOW\t $RED\u$BLACK@\h:\W$(jobscount)# " + elif [ -e ~/.dot_is_server ]; then + #PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ " + PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$(jobscount)$ " + else + #PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ " + PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$(jobscount)$ " + fi + #PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$(hg_ps1)$ " + #PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$(hg_ps1)$(__git_ps1)$ " + # /Michiel's colour config +} + +jobscount() { + local stopped=$(jobs -sp | wc -l) + local running=$(jobs -rp | wc -l) + ((running+stopped)) && echo -n "[${running}r/${stopped}s]" +} # gitprompt configuration # Set config variables first @@ -70,23 +99,7 @@ hg_ps1() { if [ "$color_prompt" = yes ]; then #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' - # Michiel's colour config - BLACK="\[\033[0m\]" - BLUE="\[\033[0;34m\]" - YELLOW="\[\033[0;33m\]" - GREEN="\[\033[0;32m\]" - RED="\[\033[0;31m\]" - PROMPT_SYMBOL='$' - if [ $USER = 'root' ]; then - PS1="$YELLOW\t $RED\u$BLACK@\h:\W$ " - elif [ -e ~/.dot_is_server ]; then - PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ " - else - PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ " - fi - #PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$(hg_ps1)$ " - #PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$(hg_ps1)$(__git_ps1)$ " - # /Michiel's colour config + PROMPT_COMMAND=set_bash_prompt else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi diff --git a/.hgrc b/.hgrc index b650afb..cdbd218 100644 --- a/.hgrc +++ b/.hgrc @@ -13,6 +13,7 @@ hgk= hgflow = ~/workspace/application_addons/mercurial/hgflow/src/hgflow.py #hggit = ~/workspace/application_addons/mercurial/hg-git/hggit prompt = /home/mbscholt/workspace/application_addons/mercurial/hg-prompt/prompt.py +shelve= [git] authors = /home/mbscholt/.hgauthors.txt diff --git a/.vimrc b/.vimrc index e6871f7..f5b7d7e 100644 --- a/.vimrc +++ b/.vimrc @@ -5,14 +5,17 @@ call vundle#begin() " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' +" == UI ====== + " Display tags of the current file ordered by scope +" You need ctags: `sudo apt-get install exuberant-ctags` or +" `brew install ctags` for example Plugin 'majutsushi/tagbar' +nmap :TagbarToggle " The unite or unite.vim plug-in can search and display information from " arbitrary sources like files, buffers, recently used files or registers. Plugin 'Shougo/unite.vim' -" == UI - " Nice statusbar, alternative for powerline. Get powerline font for best " looking result Plugin 'bling/vim-airline' @@ -31,7 +34,18 @@ map :NERDTreeToggle " close vim if the only window left open is a NERDTree autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif -" == Content convenience +" Full path fuzzy file, buffer, mru, tag, ... finder +Plugin 'kien/ctrlp.vim' +let g:ctrlp_map = 't' +let g:ctrlp_match_window_bottom = 0 +let g:ctrlp_match_window_reversed = 0 +let g:ctrlp_custom_ignore = '\v\~$|\.(o|swp|pyc|wav|mp3|ogg|blend)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|__init__\.py' +let g:ctrlp_working_path_mode = 0 +let g:ctrlp_dotfiles = 0 +let g:ctrlp_switch_buffer = 0 + + +" == Content convenience ====== " Python autocompletion Plugin 'davidhalter/jedi-vim' @@ -53,6 +67,9 @@ let g:undotree_SetFocusWhenToggle=1 " if undotree is opened, it is likely one " many filetypes. Plugin 'scrooloose/nerdcommenter' +" Highlight colours in CSS files +Plugin 'ap/vim-css-color' + " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required @@ -67,6 +84,10 @@ set dictionary+=/usr/share/dict/words " use ctrl-n ctrl-n instead of ctrl-x ctrl-k set complete-=k complete+=k +" ignorecase plus smartcase make searches case-insensitive except when you +" include upper-case characters (so /foo matches FOO and fOo, but /FOO only +" matches the former) +set ignorecase " 2006-04-24 set smartcase @@ -80,14 +101,18 @@ if &term == "xterm" || &term == "screen-bce" || &term == "screen-256color" || &t " create a bar for airline set laststatus=2 - let g:airline_powerline_fonts = 1 + let g:airline_powerline_fonts = 1 endif " paste and autoindent set pastetoggle= +" Prettify json and javascript map jt :%!json_xs -f json -t json-pretty +" Fly through buffers instead of cycling +nnoremap l :ls:b + " 2014-01-29 some sane Python settings autocmd FileType python set tabstop=4 autocmd FileType python set shiftwidth=4