Skip to content

Instantly share code, notes, and snippets.

@acro5piano
Last active June 15, 2017 03:44
Show Gist options
  • Save acro5piano/99bc2301d460fb8af76f2e4279eb3842 to your computer and use it in GitHub Desktop.
Save acro5piano/99bc2301d460fb8af76f2e4279eb3842 to your computer and use it in GitHub Desktop.
ido-git-grepを作った(仮) ref: http://qiita.com/acro5piano/items/07f397c83fbe9b153438
(defun ido-git-grep()
(interactive)
(setq user-input-line
(split-string
(ido-completing-read
"git-grep:"
(split-string (shell-command-to-string
(format "git grep -n %s" (read-string "keyword:")))
"\n"))
":"))
(find-file (nth 0 user-input-line))
(goto-char (point-min))
(forward-line (1- (string-to-number (nth 1 user-input-line)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment