Browse Source

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

pull/1/head
10sr 11 years ago
parent
commit
5b825b8c5e
3 changed files with 41 additions and 32 deletions
  1. +5
    -24
      bashrc
  2. +33
    -5
      emacs.el
  3. +3
    -3
      tmux.conf.pl

+ 5
- 24
bashrc View File

@@ -282,10 +282,13 @@ ssh(){
clk(){
local tformat="%Y/%m/%d %H:%M:%S %z"
cal
while true
REPLY=
printf "\\r`date "+${tformat}"`"
read -t 1
while test $? -ne 0
do
printf "\\r`date "+${tformat}"`"
sleep 1
read -t 1
done
}

@@ -595,28 +598,6 @@ convmv-sjis2utf8-notest(){
convmv -r -f sjis -t utf8 * --notest
}

_colors(){
echo -e \
"\e[30mBlack" \
"\e[31mRed" \
"\e[32mGreen" \
"\e[33mYellow" \
"\e[34mBlue" \
"\e[35mMagenta" \
"\e[36mCyan" \
"\e[37mWhite"
echo -e \
"\e[30;1mBright Black" \
"\e[31;1mBright Red" \
"\e[32;1mBright Green" \
"\e[33;1mBright Yellow" \
"\e[34;1mBright Blue" \
"\e[35;1mBright Magenta" \
"\e[36;1mBright Cyan" \
"\e[37;1mBright White\n" \
"\e[0m"
}

winln(){
# for windose make link (actually junction)
if test $# -eq 0


+ 33
- 5
emacs.el View File

@@ -655,6 +655,13 @@ found, otherwise returns nil."

(lazy-load-eval 'sudoku)

;; https://github.com/lunaryorn/flycheck
(when (require 'flycheck nil t)
(add-hook 'after-init-hook #'global-flycheck-mode))

(defun my-install-packages ()
nil)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; window

@@ -718,11 +725,6 @@ found, otherwise returns nil."
(fset 'makefile-warn-suspicious-lines 'ignore)
))

(defun make ()
"Run \"make -k\" in current directory."
(interactive)
(compile "make -k"))

(add-hook 'verilog-mode-hook
(lambda ()
(define-key verilog-mode-map ";" 'self-insert-command)))
@@ -1782,6 +1784,32 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; misc funcs

(defun my-grep ()
"Use git-grep if avaliable.."
(interactive)
(require 'grep)
(let ((--grep-command-bak grep-command)
(--grep-use-null-device-bak grep-use-null-device))
(if (called-interactively-p 'any)
(progn
(when (eq 0
(shell-command "git rev-parse --git-dir"))
(grep-apply-setting 'grep-command
"git --no-pager grep -nH -e ")
(grep-apply-setting 'grep-use-null-device
nil))
(call-interactively 'grep)
(grep-apply-setting 'grep-command
--grep-command-bak)
(grep-apply-setting 'grep-use-null-device
--grep-use-null-device-bak))
(message "my-grep only allow interactive call."))))

(defun make ()
"Run \"make -k\" in current directory."
(interactive)
(compile "make -k"))

(defvar sed-in-place-history nil
"History of `sed-in-place'")



+ 3
- 3
tmux.conf.pl View File

@@ -86,9 +86,9 @@ sub set_colors {
set("message-bg", "white");
set("message-fg", "black");

setw("window-status-current-bg", "default");
setw("window-status-current-fg", "default");
setw("window-status-current-attr", "reverse");
setw("window-status-current-bg", "white");
setw("window-status-current-fg", "black");
setw("window-status-current-attr", "bold");
}

sub main {


Loading…
Cancel
Save