Browse Source

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr 11 years ago
parent
commit
73d2c0580a
2 changed files with 12 additions and 17 deletions
  1. +7
    -12
      bashrc
  2. +5
    -5
      emacs.el

+ 7
- 12
bashrc View File

@@ -354,26 +354,23 @@ clk(){
}

s(){
# if test $# -eq 0
# then
# echo "No search word given." 1>&2
# return 1
# fi

if git rev-parse --git-dir >/dev/null 2>&1
then
echo ">> Using git-grep" 1>&2
echo ">> git grep -n $@" 1>&2
git grep -n "$@"
elif which ag >/dev/null 2>&1
then
echo ">> Using ag" 1>&2
echo ">> ag --pager=\"$PAGER\" $@" 1>&2
ag --pager="$PAGER" "$@"
elif which ack >/dev/null 2>&1
then
echo ">> Using ack" 1>&2
echo ">> ack --pager=\"$PAGER\" $@" 1>&2
ack --pager="$PAGER" "$@"
else
echo ">> Using grep" 1>&2
echo \
">> grep -nH --color=always" \
"--exclude=\'.svn/\*\' --exclude=\'.git/\*\'" \
"$@" "-r ." 1>&2
if test $# -eq 0
then
echo "No search word given." 1>&2
@@ -381,8 +378,6 @@ s(){
fi
grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \
| $PAGER
# echo "No search command found. Use grep." 2>&1
# return 127
fi
}



+ 5
- 5
emacs.el View File

@@ -384,19 +384,19 @@ found, otherwise returns nil."
))

(when (require 'whitespace nil t)
(add-to-list 'whitespace-display-mappings ; not work
`(tab-mark ?\t ,(vconcat "^I\t")))
(add-to-list 'whitespace-display-mappings
`(newline-mark ?\n ,(vconcat "$\n")))
(setq whitespace-style '(face
trailing ; trailing blanks
newline ; newlines
newline-mark ; use display table for newline
tab-mark
;; tab-mark
empty ; empty lines at beg or end of buffer
lines-tail ; lines over 80
))
;; (setq whitespace-newline 'font-lock-comment-face)
(add-to-list 'whitespace-display-mappings
`(newline-mark ?\n ,(vconcat "$\n")))
(add-to-list 'whitespace-display-mappings ; not work
`(tab-mark ?\t ,(vconcat "^I\t")))
(global-whitespace-mode t)
(when (eq (display-color-cells)
256)


Loading…
Cancel
Save