Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace custom function with magit-find-file

This package replaces the basic functionality I made myself.
  • Loading branch information...
commit e09bb29d3fb7523eaa68fea28781115370343f49 1 parent c6df111
@bradleywright authored
View
2  init-keybindings.el
@@ -46,6 +46,6 @@
(global-set-key (kbd "C-h C-f") 'find-function)
-(global-set-key (kbd "M-p") 'bw-find-file-git-ls-files-completing)
+(global-set-key (kbd "M-p") 'magit-find-file-completing-read)
(provide 'init-keybindings)
View
2  init-osx.el
@@ -36,7 +36,7 @@
(global-set-key (kbd "s-<return>") 'ns-toggle-fullscreen)
- (global-set-key (kbd "s-p") 'bw-find-file-git-ls-files-completing)
+ (global-set-key (kbd "s-p") 'magit-find-file-completing-read)
(global-set-key (kbd "s-F") 'ag-project)
(global-set-key (kbd "s-b") 'bw-eproject-ido-switch-buffers)
(global-set-key (kbd "H-g") 'magit-status)
View
1  init-packaging.el
@@ -33,6 +33,7 @@
js2-mode
json-mode
magit
+ magit-find-file
markdown-mode
multiple-cursors
paredit
View
9 init-utils.el
@@ -169,15 +169,6 @@ the quit."
;;(grizzl-completing-read prompt (grizzl-make-index index))
)
-(defun bw-find-file-git-ls-files-completing (&optional base-directory)
- "Uses a completing read to open a file from git ls-files"
- (interactive)
- (let ((default-directory (or base-directory (magit-get-top-dir))))
- (find-file
- (bw-completing-read
- (format "Find file: %s" (abbreviate-file-name default-directory))
- (remove-if 'bw-is-image (magit-git-lines "ls-files" "--exclude-standard" "-co"))))))
-
(defun bw-evil-escape-if-next-char (c)
"Watches the next letter. If c, then switch to Evil's normal mode; otherwise insert a k and forward unpressed key to unread-command events"
(self-insert-command 1)
View
2  packages/init-eproject.el
@@ -36,7 +36,7 @@
files, because it won't try to open any .gitignored files."
(interactive)
(if (member (eproject-type) '(generic-git))
- (bw-find-file-git-ls-files-completing)
+ (magit-find-file-completing-read)
(eproject-find-file)))
(setq eproject-completing-read-function 'eproject--ido-completing-read)
View
2  packages/init-evil.el
@@ -28,7 +28,7 @@
"k" 'kill-buffer
"K" 'kill-this-buffer
"o" 'occur
- "p" 'bw-find-file-git-ls-files-completing
+ "p" 'magit-find-file-completing-read
"r" 'recentf-ido-find-file
"s" 'ag-project
"t" 'bw-open-term
Please sign in to comment.
Something went wrong with that request. Please try again.