Browse Source

bashrc, emacs.el: add func memo

pull/1/head
10sr 11 years ago
parent
commit
064d857ab0
2 changed files with 17 additions and 0 deletions
  1. +9
    -0
      bashrc
  2. +8
    -0
      emacs.el

+ 9
- 0
bashrc View File

@@ -342,6 +342,15 @@ ssh(){
command ssh "$@" command ssh "$@"
} }


memo(){
if test -z "$1"
then
$EDITOR memo.txt
else
$EDITOR "$1/memo.txt"
fi
}

clk(){ clk(){
local tformat="%Y/%m/%d %H:%M:%S %z" local tformat="%Y/%m/%d %H:%M:%S %z"
cal cal


+ 8
- 0
emacs.el View File

@@ -1911,6 +1911,14 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; misc funcs ;; misc funcs


(defun memo (&optional dir)
"Open memo.txt"
(interactive)
(pop-to-buffer (find-file-noselect (concat (if dir
(file-name-as-directory dir)
"")
"memo.txt"))))
(file-name-as-directory "..")
(defun my-rgrep-gitgrep (word) (defun my-rgrep-gitgrep (word)
"Recursive grep with git-grep" "Recursive grep with git-grep"
(interactive "sgit-grep: Word to search: ") (interactive "sgit-grep: Word to search: ")


Loading…
Cancel
Save