Permalink
Browse files

sort file list by path length for command-t

  • Loading branch information...
1 parent ae1e2f8 commit 753453cc9204e251c1750aaa9f06bbbba5b444d5 @conanite committed May 28, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 textmate.el
View
@@ -316,7 +316,7 @@ Symbols matching the text at point are put first in the completion list."
;;; Utilities
-(defun textmate-project-files (root)
+(defun textmate-find-project-files (root)
"Finds all files in a given project."
(split-string
(shell-command-to-string
@@ -328,6 +328,11 @@ Symbols matching the text at point are put first in the completion list."
*textmate-project-root*
"/::'")) "\n" t))
+(defun textmate-project-files (root)
+ (sort
+ (textmate-find-project-files root)
+ '(lambda (a b) (< (length a) (length b)))))
+
;; http://snipplr.com/view/18683/stringreplace/
(defun textmate-string-replace (this withthat in)
"replace THIS with WITHTHAT' in the string IN"

0 comments on commit 753453c

Please sign in to comment.