Skip to content

Instantly share code, notes, and snippets.

@shirou
Created August 11, 2012 12:48
Show Gist options
  • Save shirou/3324236 to your computer and use it in GitHub Desktop.
Save shirou/3324236 to your computer and use it in GitHub Desktop.
anything_setup.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; anything.el
;;
(require 'anything)
(require 'anything-config)
(require 'recentf)
(setq recentf-max-saved-items 1000)
(recentf-mode 1)
(define-key global-map (kbd "C-c l") 'anything)
;;(define-key global-map "\C-x;" 'anything-resume)
;; anything-c-moccur等のanythingアプリケーションのみ使う場合は
(setq anything-sources
(list anything-c-source-buffers
anything-c-source-bookmarks
anything-c-source-recentf
anything-c-source-filelist
anything-c-source-kill-ring
;; anything-c-source-etags+-select
;; anything-c-source-file-name-history
;; anything-c-source-locate
))
;; (anything-iswitchb-setup)
(define-key anything-map (kbd "C-p") 'anything-previous-line)
(define-key anything-map (kbd "C-n") 'anything-next-line)
(define-key anything-map (kbd "C-v") 'anything-next-source)
(define-key anything-map (kbd "M-v") 'anything-previous-source)
;; locateを
(require 'anything-startup)
(setq anything-c-filelist-file-name "/tmp/all.filelist")
(setq anything-grep-candidates-fast-directory-regexp "^/tmp")
;; grepのエラー出力を/dev/nullに
(defadvice agp-command-line (after insert-Redirection-of-STDERR-into-agp-command-line)
(when (string-match "| head -n" ad-return-value)
(setq ad-return-value (replace-match "2>/dev/null \\&" t nil ad-return-value nil))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment