| @@ -354,26 +354,23 @@ clk(){ | |||||
| } | } | ||||
| s(){ | 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 | if git rev-parse --git-dir >/dev/null 2>&1 | ||||
| then | then | ||||
| echo ">> Using git-grep" 1>&2 | |||||
| echo ">> git grep -n $@" 1>&2 | |||||
| git grep -n "$@" | git grep -n "$@" | ||||
| elif which ag >/dev/null 2>&1 | elif which ag >/dev/null 2>&1 | ||||
| then | then | ||||
| echo ">> Using ag" 1>&2 | |||||
| echo ">> ag --pager=\"$PAGER\" $@" 1>&2 | |||||
| ag --pager="$PAGER" "$@" | ag --pager="$PAGER" "$@" | ||||
| elif which ack >/dev/null 2>&1 | elif which ack >/dev/null 2>&1 | ||||
| then | then | ||||
| echo ">> Using ack" 1>&2 | |||||
| echo ">> ack --pager=\"$PAGER\" $@" 1>&2 | |||||
| ack --pager="$PAGER" "$@" | ack --pager="$PAGER" "$@" | ||||
| else | else | ||||
| echo ">> Using grep" 1>&2 | |||||
| echo \ | |||||
| ">> grep -nH --color=always" \ | |||||
| "--exclude=\'.svn/\*\' --exclude=\'.git/\*\'" \ | |||||
| "$@" "-r ." 1>&2 | |||||
| if test $# -eq 0 | if test $# -eq 0 | ||||
| then | then | ||||
| echo "No search word given." 1>&2 | echo "No search word given." 1>&2 | ||||
| @@ -381,8 +378,6 @@ s(){ | |||||
| fi | fi | ||||
| grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \ | grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \ | ||||
| | $PAGER | | $PAGER | ||||
| # echo "No search command found. Use grep." 2>&1 | |||||
| # return 127 | |||||
| fi | fi | ||||
| } | } | ||||
| @@ -384,19 +384,19 @@ found, otherwise returns nil." | |||||
| )) | )) | ||||
| (when (require 'whitespace nil t) | (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 | (setq whitespace-style '(face | ||||
| trailing ; trailing blanks | trailing ; trailing blanks | ||||
| newline ; newlines | newline ; newlines | ||||
| newline-mark ; use display table for newline | newline-mark ; use display table for newline | ||||
| tab-mark | |||||
| ;; tab-mark | |||||
| empty ; empty lines at beg or end of buffer | empty ; empty lines at beg or end of buffer | ||||
| lines-tail ; lines over 80 | lines-tail ; lines over 80 | ||||
| )) | )) | ||||
| ;; (setq whitespace-newline 'font-lock-comment-face) | ;; (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) | (global-whitespace-mode t) | ||||
| (when (eq (display-color-cells) | (when (eq (display-color-cells) | ||||
| 256) | 256) | ||||