better git-powered bashrc, better pymode vimrc (no more documentationfinding)
This commit is contained in:
parent
32bf165964
commit
a976983750
2 changed files with 17 additions and 11 deletions
|
|
@ -7,17 +7,16 @@ shopt -s histappend
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
parse_git_dirty() {
|
||||||
|
[[ $(git-status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "(*)"
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_git_stash() {
|
||||||
|
[[ $(git stash list 2> /dev/null | tail -n1) != "" ]] && echo "(^)"
|
||||||
|
}
|
||||||
|
|
||||||
parse_git_branch () {
|
parse_git_branch () {
|
||||||
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (git::\1)#'
|
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"
|
||||||
}
|
|
||||||
parse_svn_branch() {
|
|
||||||
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk '{print " (svn::"$1")" }'
|
|
||||||
}
|
|
||||||
parse_svn_url() {
|
|
||||||
svn info 2>/dev/null | sed -ne 's#^URL: ##p'
|
|
||||||
}
|
|
||||||
parse_svn_repository_root() {
|
|
||||||
svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BLACK="\[\033[0;38m\]"
|
BLACK="\[\033[0;38m\]"
|
||||||
|
|
@ -77,5 +76,5 @@ fi
|
||||||
|
|
||||||
# configure my multi-line prompt
|
# configure my multi-line prompt
|
||||||
export PS1="
|
export PS1="
|
||||||
$BLACK[ \u@$RED\h $GREEN\w$RED_BOLD\$(parse_svn_branch)\$(__git_ps1 \" (%s)\") $BLACK]
|
$BLACK[ \u@$RED\h $GREEN\w $RED_BOLD{ \$(parse_git_branch) \$(parse_git_dirty)\$(parse_git_stash) } $BLACK]
|
||||||
> "
|
> "
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,13 @@ let g:pymode_lint_checker = "pyflakes"
|
||||||
|
|
||||||
" don't complete with rope
|
" don't complete with rope
|
||||||
let g:pymode_rope_completion = 0
|
let g:pymode_rope_completion = 0
|
||||||
|
let g:pymode_rope_autoimport = 0
|
||||||
|
|
||||||
|
" don't usually care about documentation
|
||||||
|
let g:pymode_rope_lookup_project = 0
|
||||||
|
|
||||||
|
" better definition keybind
|
||||||
|
let g:pymode_rope_goto_definition_bind = 'K'
|
||||||
|
|
||||||
let g:pymode_breakpoint_cmd = 'import ipdb;ipdb.set_trace() # FIXME: breakpoint!'
|
let g:pymode_breakpoint_cmd = 'import ipdb;ipdb.set_trace() # FIXME: breakpoint!'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue