aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2011-11-20 21:39:44 +0800
committerLAN-TW <lantw44@gmail.com>2011-11-20 21:39:44 +0800
commitea9dedd0fb2d5c08dd09eb98474d3e844fc60daf (patch)
tree25e491b13c3f3597f138dccb7b6e7e451569df30
parent0a0553c24de2533f41adcd56100f4d24926a67c3 (diff)
downloadconfigfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar.gz
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar.bz2
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar.lz
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar.xz
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.tar.zst
configfile-ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf.zip
bash_include: 產生 screen ACL 設定檔、文字轉 HTML | vimrc: 錯誤訊息放家目錄vimrc-20111120bash_include-20111120
-rw-r--r--bash_include37
-rw-r--r--vimrc12
2 files changed, 42 insertions, 7 deletions
diff --git a/bash_include b/bash_include
index 6ab16fa..85b7709 100644
--- a/bash_include
+++ b/bash_include
@@ -9,7 +9,7 @@ alias stopcolor='PS1=$nocolorprompting'
alias ll='ls -l'
alias rm='rm -i'
-alias cp='cp -i'
+alias cp='cp -pi'
alias mv='mv -i'
alias jobs='jobs -l'
alias less='less -RS'
@@ -24,6 +24,8 @@ default_tty_setting=`stty -g`
alias savetty='default_tty_setting=`stty -g`'
alias resetty='stty $default_tty_setting'
+alias sg='sudo -g'
+
# Function
function compile_all ()
@@ -68,6 +70,37 @@ function compile_all ()
}
+function convert_to_html ()
+{
+ while [ "$1" '!=' '' ]
+ do
+ for i in "$1"
+ do
+ vim $i -c 'set background=dark' \
+ -c 'highlight PreProc ctermfg=darkcyan' \
+ -c "$BEFORE_CONVERT_TO_HTML" \
+ -c TOhtml \
+ -c :w \
+ -c :qa
+ done
+ shift
+ done
+}
+
+function mkscreenacl ()
+{
+ PERMIT_COMMAND="select windowlist other meta detach reset hardcopy info redisplay lastmsg next prev xon xoff windows suspend help colon copy paste writebuf readbuf displays stuff attach"
+ while [ "$1" '!=' '' ]
+ do
+ for i in $PERMIT_COMMAND
+ do
+ echo "aclchg $1 +x $i"
+ done
+ echo "aclchg $1 -rw \"#?\""
+ shift
+ done
+}
+
# Starting doing something
startcolor
@@ -78,3 +111,5 @@ bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
shopt -s histappend
+
+# ~/check_dmesg.sh 5 &
diff --git a/vimrc b/vimrc
index cca6b61..6c4af1c 100644
--- a/vimrc
+++ b/vimrc
@@ -1,5 +1,5 @@
-let $ERRFILE="/tmp/f8fe1f28-6e6e-11e0-b22e-000c760ae4c6.err"
-let $CFLAGS="-Wall -pipe"
+let $ERRFILE="/tmp/fc0edaa9-1383-11e1-8659-000c760ae4c6.err"
+let $CFLAGS="-Wall -pipe -g"
let $LDFLAGS=""
set bs=2
set ls=2
@@ -17,11 +17,11 @@ highlight Search term=reverse ctermbg=4 ctermfg=7
function! SingleCompile()
let file_suffix = expand("%:e")
if file_suffix == "c"
- !gcc ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE}
- cg ${ERRFILE}
+ !gcc ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${HOME}${ERRFILE}
+ cg ${HOME}${ERRFILE}
elseif file_suffix == "cpp"
- !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE}
- cg ${ERRFILE}
+ !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${HOME}${ERRFILE}
+ cg ${HOME}${ERRFILE}
else
echo "This file has an UNKNOWN SUFFIX!"
endif