OK, the Google Chrome new tab page extension I’ve been (extremely lazily) developing for quite some time is live now! It’s not much, really – just displaying one bookmarks folder (I use “Bookmarks Bar”) and launchable extensions, but that’s what I use the most myself. Oh, and some Chrome shortcuts – like cookies, passwords etc. – too:
It’s on Chrome Web Store – but there’s also a separate page to send around: https://www.hydralien.net/anothertab/
Oh, and the code is public, too: https://bitbucket.org/hydralien/anothertab
“git grep” is incredibly useful on large repositories – where regular grep (or awk or whatever) takes minutes to proceed, git grep does the job merely in seconds. Very, very useful. The only thing is, I would really like this working as Emacs search – with files selection, highlighting etc.
Didn’t take too long to find a suitable solution – but took some time to tailor it a little. Basically it’s all taken from https://www.ogre.com/node/447 with some minor adjustments – like, for instance, I do a lot of development in “remote” mode, i.e. I open files from remote hosts via SSH (hence replace-regexp-in-string part). Enjoy!
(defun git-grep (search path)
“git-grep the entire current repo”
(interactive (list (completing-read (concat “Search for (” (current-word) “): “) nil nil nil nil (current-word)) (read-file-name “in directory: ” nil “” t)))
(grep-find (concat “git –no-pager grep -P -n –no-color ”
(shell-quote-argument (if (> (length search) 0) search (or (current-word) “”)))
(replace-regexp-in-string “/ssh.?:.+:” “” path))))
now if you add this to your .emacs, you can have it launched on some key combination (like Command-c g in my case):
(global-set-key (kbd “C-c g”) ‘git-grep)