2012-04-14 8 views

Antwort

30

dieser Befehl zeigt die Schnipsel und Schlüssel

m-x yas/describe-tables 
+0

Diese Funktion gibt es nicht. – Reactormonk

+1

@Tass Bitte aktualisieren Sie Ihr Yas-Paket https://github.com/capitaomorte/yasnippet/downloads – kindahero

5

Suchen Sie nach M-x yas/insert-snippet? Es werden alle verfügbaren Snippets aufgelistet und Sie können eine davon zum Einfügen auswählen.

8

yas/describe-tables ist ein Alias ​​für yas-describe-tables in yasnippet.el.

(yas/describe-Tabellen & optional wählen)

Diese Funktion ist veraltet, da yasnippet 0,8;

Verwenden Sie stattdessen yas-describe-tables.

Zeigen Sie Snippets für jede Tabelle an.

1
(defvar lawlist-context-menu-map 
    (let ((map (make-sparse-keymap "Context Menu"))) 
    (define-key map [help-for-help] (cons "Help" 'help-for-help)) 
    (define-key map [seperator-two] '(menu-item "--")) 
    (define-key map [my-menu] (cons "LAWLIST" (make-sparse-keymap "My Menu"))) 
    (define-key map [my-menu 01] (cons "Next Line" 'next-line)) 
    (define-key map [my-menu 02] (cons "Previous Line" 'previous-line)) 
    (define-key map [seperator-one] '(menu-item "--")) 
    map) "Keymap for the LAWLIST context menu.") 

(defun lawlist-popup-context-menu (event &optional prefix) 
    "Popup a context menu." 
    (interactive "@e \nP") 
    (define-key lawlist-context-menu-map [lawlist-major-mode-menu] 
     `(menu-item ,(symbol-name major-mode) 
     ,(mouse-menu-major-mode-map) :visible t)) 
    (define-key lawlist-context-menu-map (vector major-mode) 
     `(menu-item ,(concat "YAS " (symbol-name major-mode)) 
     ,(gethash major-mode yas--menu-table) 
      :visible (yas--show-menu-p ',major-mode))) 
    (popup-menu lawlist-context-menu-map event prefix)) 

(global-set-key [mouse-3] 'lawlist-popup-context-menu) 

Example http://www.lawlist.com/images/context-menu.png


Siehe auch das zugehörige Beispiel in den folgenden Link: https://stackoverflow.com/a/24346990/2112489