1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Merge branch 'master' of /home/mbscholt/.dot/dotfiles

Conflicts:
	.bashrc
This commit is contained in:
Michiel Scholten
2014-11-29 12:22:36 +01:00
3 changed files with 63 additions and 24 deletions

53
.bashrc
View File

@@ -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

1
.hgrc
View File

@@ -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

33
.vimrc
View File

@@ -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 <F8> :TagbarToggle<CR>
" 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 <C-n> :NERDTreeToggle<CR>
" 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 = '<Leader>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=<F10>
" Prettify json and javascript
map <Leader>jt <Esc>:%!json_xs -f json -t json-pretty<CR>
" Fly through buffers instead of cycling
nnoremap <leader>l :ls<cr>:b<space>
" 2014-01-29 some sane Python settings
autocmd FileType python set tabstop=4
autocmd FileType python set shiftwidth=4