-
-
Save lexdene/7540775 to your computer and use it in GitHub Desktop.
Revisions
-
dongweiming created this gist
Nov 18, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ 在.emacs.d/core/prelude-core.el最后添加函数 (defun prelude-py-taglist (arg) "简易版taglist" (interactive "P") (let ((buffer-other (if arg "*py-taglist*" (format "*py-taglist from %s*" (buffer-name))))) (occur-1 "class \\|def " nil (if arg (delq nil (mapcar (lambda (buffer) (when (eq 'python-mode (with-current-buffer buffer)) buffer)) (buffer-list))) (list (current-buffer))) buffer-other) (let ((line (line-number-at-pos))) (switch-to-buffer-other-window buffer-other) (end-of-buffer) (while (and (search-backward-regexp "^ *\\([0-9]+\\):" nil t) (> (string-to-int (match-string 1)) line)) t)))) This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ 然后在.emacs.d/core/prelude-mode.el 82 行添加一个绑定 --- 看心情放什么地方啦 (define-key map (kbd "C-c v") 'prelude-py-taglist)