This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'vc-git) | |
(provide 'my-git) | |
(defun my-git-toplevel () | |
(vc-git-root (file-truename (if (buffer-file-name) | |
(file-name-directory (buffer-file-name)) | |
default-directory)))) | |
;; return git toplevel of root project | |
(defun my-git-root () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; override isearch.el | |
(lexical-let | |
((original-function (symbol-function 'isearch-lazy-highlight-update))) | |
(defun isearch-lazy-highlight-update () | |
(mapc (lambda (window) | |
(save-selected-window | |
(select-window window) | |
(let ((isearch-lazy-highlight-window (selected-window)) | |
(isearch-lazy-highlight-window-start (window-start)) | |
(isearch-lazy-highlight-window-end (window-end)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'my-git) | |
(require 'anything-config) | |
(provide 'anything-git-grep) | |
(defun anything-git-grep-process () | |
(anything-aif (anything-attr 'default-directory) | |
(let ((default-directory it)) | |
(apply 'start-process "git-grep-process" nil | |
"git" "--no-pager" "grep" "--full-name" "-n" "--no-color" | |
(nbutlast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <utility> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <cmath> | |
#include <iostream> | |
#include <queue> |
NewerOlder