From c24977f69324e8c748ca5e84322a949a3ca1e97c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 14 Nov 2012 12:01:37 +0900 Subject: [PATCH 1/5] add git ls alias --- setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index f02537b..841fb75 100755 --- a/setup.sh +++ b/setup.sh @@ -65,7 +65,8 @@ git_config(){ git config --global alias.cim "commit --verbose -m" git config --global alias.di "diff --color" git config --global alias.me "merge --no-ff --stat -v" - git config --global alias.ls "ls-files -v --full-name" + # git config --global alias.ls "ls-files -v --full-name" + git config --global alias.ls "status -u -s ." git config --global alias.sl "!sl" # git config --global alias.my-ls "ls-files | xargs ls" # git config --global alias.ll "!git ls-files | xargs ls -l -CFG --color=auto --time-style=long-iso" From ff1ebe8ed969a1644ca81c39fdbb89521a0e2bb9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 15 Nov 2012 13:35:22 +0900 Subject: [PATCH 2/5] update dired line moving functions --- emacs.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/emacs.el b/emacs.el index 642d7d4..04aa6cd 100644 --- a/emacs.el +++ b/emacs.el @@ -1290,11 +1290,12 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." (if (> arg 0) (progn ;; (ignore 'my-dired-print-current-dir-and-file) - (forward-line -1) - (when (eq (line-number-at-pos) + (if (eq (line-number-at-pos) 1) - (goto-char (point-max))) - (my-dired-previous-line (if (dired-get-filename nil t) + (goto-char (point-max)) + (forward-line -1)) + (my-dired-previous-line (if (or (dired-get-filename nil t) + (dired-get-subdir)) (- arg 1) arg))) (dired-move-to-filename))) @@ -1305,11 +1306,12 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." (if (> arg 0) (progn ;; (ignore 'my-dired-print-current-dir-and-file) - (forward-line 1) - (when (eq (point) + (if (eq (point) (point-max)) - (goto-char (point-min))) - (my-dired-next-line (if (dired-get-filename nil t) + (goto-char (point-min)) + (forward-line 1)) + (my-dired-next-line (if (or (dired-get-filename nil t) + (dired-get-subdir)) (- arg 1) arg))) (dired-move-to-filename))) From 40bc04e2b546fe589007e0f8e828d4231873f02b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 15 Nov 2012 15:44:25 +0900 Subject: [PATCH 3/5] remove comment --- emacs.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/emacs.el b/emacs.el index 04aa6cd..fefa82d 100644 --- a/emacs.el +++ b/emacs.el @@ -1289,7 +1289,6 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." (interactive "p") (if (> arg 0) (progn - ;; (ignore 'my-dired-print-current-dir-and-file) (if (eq (line-number-at-pos) 1) (goto-char (point-max)) @@ -1305,7 +1304,6 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." (interactive "p") (if (> arg 0) (progn - ;; (ignore 'my-dired-print-current-dir-and-file) (if (eq (point) (point-max)) (goto-char (point-min)) From bc59be820d6b9bddfc4617a8b0ed3fef3e36c8d5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 15 Nov 2012 16:37:16 +0900 Subject: [PATCH 4/5] add func sed-in-place --- emacs.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs.el b/emacs.el index fefa82d..257c9e7 100644 --- a/emacs.el +++ b/emacs.el @@ -1871,6 +1871,17 @@ when SEC is nil, stop auto save if enabled." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; misc funcs +(defvar sed-in-place-history nil + "History of `sed-in-place'") + +(defun sed-in-place (command) + "sed in place"a + (interactive (list (read-shell-command "sed in place: " + "sed --in-place=.bak -e " + 'sed-in-place-history))) + (shell-command command + "*sed in place*")) + (defun dir-show (&optional dir) (interactive) (let ((bf (get-buffer-create "*dir show*")) From 465366efd9dd74a41fc54f8ad6e9b1e55c99233d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 15 Nov 2012 16:39:28 +0900 Subject: [PATCH 5/5] fix bug --- emacs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 257c9e7..fe53c22 100644 --- a/emacs.el +++ b/emacs.el @@ -1875,7 +1875,7 @@ when SEC is nil, stop auto save if enabled." "History of `sed-in-place'") (defun sed-in-place (command) - "sed in place"a + "sed in place" (interactive (list (read-shell-command "sed in place: " "sed --in-place=.bak -e " 'sed-in-place-history)))