From 93721cc2e9538a4578b90d155a291fd093b2136f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 21 Nov 2012 11:55:25 +0900 Subject: [PATCH] do not highlight current line because it does not work with term-mode --- bashrc | 42 +++++++++++++++++++++--------------------- setup.sh | 3 +++ vimrc | 11 ++++++----- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/bashrc b/bashrc index d7add76..0c2099c 100755 --- a/bashrc +++ b/bashrc @@ -468,27 +468,6 @@ convmv-sjis2utf8-notest(){ convmv -r -f sjis -t utf8 * --notest } -__my_moc_state(){ - type mocp >/dev/null 2>&1 || return - test "`mocp -Q %state 2>/dev/null`" == PLAY || return - printf "$1" "`mocp -Q %title 2>/dev/null`" -} - -__my_parse_svn_branch() { - local LANG=C - local svn_url=$(svn info 2>/dev/null | sed -ne 's#^URL: ##p') - local svn_repository_root=$(svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p') - echo ${svn_url} | sed -e 's#^'"${svn_repository_root}"'##g' | awk '{print $1}' -} - -__my_svn_ps1(){ - if svn status >/dev/null 2>&1 - then - local svn_branch=$(__my_parse_svn_branch) - test -n "${svn_branch}" && printf "$1" "{$svn_branch}" - fi -} - #Change ANSI Colors _chengecolors(){ echo -e \ @@ -549,6 +528,27 @@ winln(){ fi } +__my_moc_state(){ + type mocp >/dev/null 2>&1 || return + test "`mocp -Q %state 2>/dev/null`" == PLAY || return + printf "$1" "`mocp -Q %title 2>/dev/null`" +} + +__my_parse_svn_branch() { + local LANG=C + local svn_url=$(svn info 2>/dev/null | sed -ne 's#^URL: ##p') + local svn_repository_root=$(svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p') + echo ${svn_url} | sed -e 's#^'"${svn_repository_root}"'##g' | awk '{print $1}' +} + +__my_svn_ps1(){ + if svn status >/dev/null 2>&1 + then + local svn_branch=$(__my_parse_svn_branch) + test -n "${svn_branch}" && printf "$1" "{$svn_branch}" + fi +} + __my_battery_status(){ local dir=/sys/class/power_supply/BAT0 if test -d $dir && test -r $dir/status && test -r $dir/charge_full && test -r $dir/charge_now diff --git a/setup.sh b/setup.sh index f02537b..53d2f4e 100755 --- a/setup.sh +++ b/setup.sh @@ -80,6 +80,9 @@ git_config(){ mac_defaults(){ test "`uname`" = Darwin || return 1 + # http://appdrill.net/60641/mac-boot-mute.html + #sudo nvram SystemAudioVolume=%80 + # add quit entry in menu defaults write com.apple.finder QuitMenuItem -bool YES # show full path on titlebar diff --git a/vimrc b/vimrc index e9af903..4018093 100644 --- a/vimrc +++ b/vimrc @@ -96,11 +96,12 @@ noremap :w " highlight current line " set cursorline " show cursor line only in current window -augroup cch - autocmd! cch - autocmd WinLeave * set nocursorline - autocmd WinEnter,BufRead * set cursorline -augroup END +" not work in term-mode of emacs +" augroup cch +" autocmd! cch +" autocmd WinLeave * set nocursorline +" autocmd WinEnter,BufRead * set cursorline +" augroup END hi clear CursorLine highlight CursorLine term=underline cterm=underline gui=underline