mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
more changes to the .yas-setup files and fix issue 129
This commit is contained in:
parent
35eaad9d40
commit
7fe4e84f91
@ -288,8 +288,8 @@ which means:
|
|||||||
|
|
||||||
* It usually looks beautiful. E.g. when you compile Emacs with gtk
|
* It usually looks beautiful. E.g. when you compile Emacs with gtk
|
||||||
support, this menu will be rendered with your gtk theme.
|
support, this menu will be rendered with your gtk theme.
|
||||||
* Emacs have little control over it. E.g. you can't use ``C-n``,
|
* Your window system may or may not allow to you use ``C-n``, ``C-p``
|
||||||
``C-p`` to navigate.
|
to navigate this menu.
|
||||||
* This function can't be used when in a terminal.
|
* This function can't be used when in a terminal.
|
||||||
|
|
||||||
.. image:: images/ido-menu.png
|
.. image:: images/ido-menu.png
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"Html-mode snippets behave as close to TextMate as possible.")
|
"Html-mode snippets behave as close to TextMate as possible.")
|
||||||
|
|
||||||
(defun yas/html-activate ()
|
(defun yas/html-activate ()
|
||||||
(add-to-list 'yas/mode-symbol 'html-mode))
|
(add-to-list (make-local-variable 'yas/mode-symbol) 'html-mode))
|
||||||
|
|
||||||
(add-hook 'nxml-mode-hook 'yas/html-activate)
|
(add-hook 'nxml-mode-hook 'yas/html-activate)
|
||||||
(add-hook 'rhtml-mode-hook 'yas/html-activate)
|
(add-hook 'rhtml-mode-hook 'yas/html-activate)
|
||||||
@ -80,7 +80,7 @@
|
|||||||
(string-match (format "<%s>\\(.*\\)</%s>" wrap wrap)
|
(string-match (format "<%s>\\(.*\\)</%s>" wrap wrap)
|
||||||
string)
|
string)
|
||||||
(match-string 1 string))
|
(match-string 1 string))
|
||||||
(concat "<em>" string "</em>")))
|
(concat wrap string wrap)))
|
||||||
|
|
||||||
(defun yas/html-between-tag-pair-p ()
|
(defun yas/html-between-tag-pair-p ()
|
||||||
(save-excursion
|
(save-excursion
|
||||||
@ -649,6 +649,9 @@
|
|||||||
|
|
||||||
;; Substitutions for: binding
|
;; Substitutions for: binding
|
||||||
;;
|
;;
|
||||||
|
;; # as in Commands/Persistent Include.yasnippet
|
||||||
|
;; =yyas> (yas/unknown)
|
||||||
|
;;
|
||||||
;; # as in Snippets/XHTML   NonBreakingSpace.yasnippet
|
;; # as in Snippets/XHTML   NonBreakingSpace.yasnippet
|
||||||
;; ~ =yyas> (yas/unknown)
|
;; ~ =yyas> (yas/unknown)
|
||||||
;;
|
;;
|
||||||
|
@ -165,6 +165,12 @@
|
|||||||
(and (yas/rails-root)
|
(and (yas/rails-root)
|
||||||
(string-match "app/views/" default-directory)))
|
(string-match "app/views/" default-directory)))
|
||||||
|
|
||||||
|
(yas/define-condition-cache
|
||||||
|
yas/rails-helper-p
|
||||||
|
"Non-nil if the current buffer is a rails helper."
|
||||||
|
(and (yas/rails-root)
|
||||||
|
(string-match "app/helpers/" default-directory)))
|
||||||
|
|
||||||
(yas/define-condition-cache
|
(yas/define-condition-cache
|
||||||
yas/rails-controller-p
|
yas/rails-controller-p
|
||||||
"Non-nil if the current buffer is a rails controller."
|
"Non-nil if the current buffer is a rails controller."
|
||||||
@ -399,7 +405,7 @@ are recognized. Stolen from `rinari-mode' more or`' less."
|
|||||||
;; text.html.ruby =yyas> (yas/unknown)
|
;; text.html.ruby =yyas> (yas/unknown)
|
||||||
;;
|
;;
|
||||||
;;
|
;;
|
||||||
;; AC385ABF-96CD-4FCB-80AD-BF37D6EE79D2 =yyas> (yas/rails-view-p)
|
;; AC385ABF-96CD-4FCB-80AD-BF37D6EE79D2 =yyas> (and (member major-mode '(nxml-mode html-mode rhtml-mode)) (yas/rails-view-p))
|
||||||
|
|
||||||
|
|
||||||
;; Substitutions for: binding
|
;; Substitutions for: binding
|
||||||
@ -887,9 +893,9 @@ are recognized. Stolen from `rinari-mode' more or`' less."
|
|||||||
(yas/ignore-item "FD8CC811-2AD3-480F-B975-DF959DC96C67")
|
(yas/ignore-item "FD8CC811-2AD3-480F-B975-DF959DC96C67")
|
||||||
;; Drop / Create Table
|
;; Drop / Create Table
|
||||||
(yas/item "20375601-B13F-4314-B8E4-362706566636")
|
(yas/item "20375601-B13F-4314-B8E4-362706566636")
|
||||||
;; Ignoring Change / Change Table
|
;; Change / Change Table
|
||||||
(yas/ignore-item "20FC02C5-32A3-4F20-B163-FF75C9FDFABF")
|
(yas/item "20FC02C5-32A3-4F20-B163-FF75C9FDFABF")
|
||||||
|
(yas/separator)
|
||||||
(yas/submenu "Create columns t. drop-down list"
|
(yas/submenu "Create columns t. drop-down list"
|
||||||
(;; t.string (tcs)
|
(;; t.string (tcs)
|
||||||
(yas/item "B757F7E5-E4BD-11DC-A11A-00112475D960")
|
(yas/item "B757F7E5-E4BD-11DC-A11A-00112475D960")
|
||||||
@ -1082,7 +1088,6 @@ are recognized. Stolen from `rinari-mode' more or`' less."
|
|||||||
"7BC860E6-7561-4E6E-983B-507D7A6F6228"
|
"7BC860E6-7561-4E6E-983B-507D7A6F6228"
|
||||||
"221969A1-A5EA-4A8E-8817-C74EBED63901"
|
"221969A1-A5EA-4A8E-8817-C74EBED63901"
|
||||||
"33057A79-677B-4DFB-99D4-1492778BDDC6"
|
"33057A79-677B-4DFB-99D4-1492778BDDC6"
|
||||||
"20FC02C5-32A3-4F20-B163-FF75C9FDFABF"
|
|
||||||
"A219EBB8-004A-4012-B5B2-232C9A5C94F8"
|
"A219EBB8-004A-4012-B5B2-232C9A5C94F8"
|
||||||
"42DE1441-D1B7-4998-BAF9-16B1EC7E210C"
|
"42DE1441-D1B7-4998-BAF9-16B1EC7E210C"
|
||||||
"25F8F5D8-2BD1-45D8-8B2A-9F2EA4F73AA2"
|
"25F8F5D8-2BD1-45D8-8B2A-9F2EA4F73AA2"
|
||||||
@ -1113,9 +1118,6 @@ are recognized. Stolen from `rinari-mode' more or`' less."
|
|||||||
;; # as in Commands/Autocomplete Foreign Key Fixture Reference (habtm).yasnippet
|
;; # as in Commands/Autocomplete Foreign Key Fixture Reference (habtm).yasnippet
|
||||||
;; 275C0B86-F735-49B6-8A22-218A8F4CC2E0 =yyas> (yas/unknown)
|
;; 275C0B86-F735-49B6-8A22-218A8F4CC2E0 =yyas> (yas/unknown)
|
||||||
;;
|
;;
|
||||||
;; # as in Macros/Change Change Table.yasnippet
|
|
||||||
;; 20FC02C5-32A3-4F20-B163-FF75C9FDFABF =yyas> (yas/unknown)
|
|
||||||
;;
|
|
||||||
;; # as in Commands/Rake Migrate.yasnippet
|
;; # as in Commands/Rake Migrate.yasnippet
|
||||||
;; 985F56D4-82ED-4C45-8250-2ECCFC71957E =yyas> (yas/unknown)
|
;; 985F56D4-82ED-4C45-8250-2ECCFC71957E =yyas> (yas/unknown)
|
||||||
;;
|
;;
|
||||||
|
@ -247,6 +247,9 @@
|
|||||||
nil
|
nil
|
||||||
'ri-history)))
|
'ri-history)))
|
||||||
(with-current-buffer (get-buffer-create "*Ri*")
|
(with-current-buffer (get-buffer-create "*Ri*")
|
||||||
|
(setq buffer-read-only nil)
|
||||||
|
(erase-buffer)
|
||||||
|
(setq default-directory "~")
|
||||||
(setq buffer-read-only nil)
|
(setq buffer-read-only nil)
|
||||||
(shell-command (concat "ri -f ansi " query) "*Ri*")
|
(shell-command (concat "ri -f ansi " query) "*Ri*")
|
||||||
(ansi-color-apply-on-region (point-min) (point-max))
|
(ansi-color-apply-on-region (point-min) (point-max))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user