2012-01-03 8 views
29

Używam ECB (kodeks Emacs Browser) i mój domyślny układ jest następujący:Sortowanie wg nazwy metody przedstawione w ECB-metodami bufor

;; +------+-------+--------------------------------------+ 
;; |    |          | 
;; | Directories |          | 
;; |    |          | 
;; +------+-------+          | 
;; | History |    Edit     | 
;; +------+-------+          | 
;; | Methods |          | 
;; |    |          | 
;; +-----------------------------------------------------+ 

Domyślnie metody są prezentowane w kolejności pojawiają się w edytowanym buforze, ale szukam sposobu na posortowanie ich według nazwy. Chciałem użyć czegoś takiego jak ecb-methods-sort-method, ale wydaje się, że nie istnieje. Dowolna wskazówka, jak to ustawić?

+0

potencjalnie, można to zrobić na przykład poprzez zmianę kodu EBC i wprowadzić nowy parametr konfiguracji. Czy nadal potrzebujesz tego? –

+0

tak, ale to oczywiście nie jest najważniejsze, po prostu widzę, że jest obecny na innych edytorach (takich jak TextMate) i ma to definitywnie sens. Teraz przyznam się, że nie jestem wystarczająco dobrym programistą seplencyjnym, aby przejść do kodu ECB ... –

+8

Proszę, napisz do mnie przez e-mail lub zgłoś odpowiedni numer na https://github.com/alexott/ecb - Spróbuję znaleźć czas na wdrożenie tego –

Odpowiedz

1

Wziąłem szybki rzut oka na docs, Look Slike można dostosować 'ECB-metody-menu-sorter'.

C-h v ecb-methods-menu-sorter 

Od docs:

*Function which re-sorts the menu-entries of the directories buffer.   
If a function then this function is called to re-arrange the menu-entries of 
the combined menu-entries of the user-menu-extensions of      
`ecb-directories-menu-user-extension' and the built-in-menu     
`ecb-directories-menu'. If nil then no special sorting will be done and the 
user-extensions are placed in front of the built-in-entries.     

The function get one argument, a list of menu-entries. For the format of this 
argument see `ecb-directories-menu-user-extension'. The function must return a 
new list in the same format. Of course this function can not only re-arrange 
the entries but also delete entries or add new entries.      
+0

Daj mi znać, jeśli potrzebujesz pomocy przy realizacji funkcji sortowania – Raghu

+0

dzięki za zobaczenie! –

Powiązane problemy