[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c61f81f 070/177: Closes #439: add a faq question about red
From: |
João Távora |
Subject: |
[elpa] master c61f81f 070/177: Closes #439: add a faq question about redefining keys |
Date: |
Sat, 28 Mar 2015 15:40:56 +0000 |
branch: master
commit c61f81f02d19b248f7a2938f6e16c81c62ef362a
Author: Joao Tavora <address@hidden>
Commit: Joao Tavora <address@hidden>
Closes #439: add a faq question about redefining keys
Also, don't mention yas-trigger-key anymore in the manual
---
doc/faq.org | 23 +++++++++++++++++++++--
doc/snippet-development.org | 8 ++++----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/doc/faq.org b/doc/faq.org
index 622a3d7..c025776 100644
--- a/doc/faq.org
+++ b/doc/faq.org
@@ -65,7 +65,7 @@ As an alternative, you can also try
(unless (and (interactive-p)
(yas-expand))
ad-do-it)))))
-
+
(yas-advise-indent-function 'ruby-indent-line)
#+END_SRC
@@ -99,7 +99,26 @@ same property in yasnippet's overlays, even if one sets the
latter's
solve this problem, drop a line in the
[[http://groups.google.com/group/smart-snippet][discussion group]].
-* How do I turn off the minor mode where in some buffers
+* How to I use alternative keys, i.e. not TAB?
+
+Edit the keymaps [[sym:yas-minor-mode-map][=yas-minor-mode-map=]] and
+[[sym:yas-keymap][=yas-keymap=]] as you would any other keymap:
+
+#+begin_src emacs-lisp :exports code
+ (define-key yas-minor-mode-map (kbd "<tab>") nil)
+ (define-key yas-minor-mode-map (kbd "TAB") nil)
+ (define-key yas-minor-mode-map (kbd "<the new key>") 'yas-expand)
+
+ ;;keys for navigation
+ (define-key yas-keymap [(tab)] nil)
+ (define-key yas-keymap (kbd "TAB") nil)
+ (define-key yas-keymap [(shift tab)] nil)
+ (define-key yas-keymap [backtab] nil)
+ (define-key yas-keymap (kbd "<new-next-field-key>")
'yas-next-field-or-maybe-expand)
+ (define-key yas-keymap (kbd "<new-prev-field-key>") 'yas-prev)
+#+end_src
+
+* How do I turn off the minor mode where in some buffers?
The best way, since version 0.6.1c, is to set the default value of the
variable [[sym:yas-dont-activate][=yas-dont-activate=]] to a lambda function
like so:
diff --git a/doc/snippet-development.org b/doc/snippet-development.org
index 8e3b282..a7d653a 100644
--- a/doc/snippet-development.org
+++ b/doc/snippet-development.org
@@ -78,10 +78,10 @@ Here's a list of currently supported directives:
** =# key:= snippet abbrev
-This is the probably the most important directive, it's the abbreviation
-you type to expand a snippet just before hitting
[[sym:yas-trigger-key][=yas-trigger-key=]]. If
-you don't specify this the snippet will not be expandable through the
-key mechanism.
+This is the probably the most important directive, it's the
+abbreviation you type to expand a snippet just before hitting the key
+that runs [[sym:yas-expand][=yas-expand=]]. If you don't specify this
+the snippet will not be expandable through the trigger mechanism.
** =# name:= snippet name
- [elpa] master 21914cf 064/177: yas--document-symbol: reindent, (continued)
- [elpa] master 21914cf 064/177: yas--document-symbol: reindent, João Távora, 2015/03/28
- [elpa] master f86529c 065/177: only crosslink exported symbols, João Távora, 2015/03/28
- [elpa] master 0aebb41 055/177: move top heading to title, João Távora, 2015/03/28
- [elpa] master 46c378d 063/177: format args in docstrings as =code=, not /italic/, João Távora, 2015/03/28
- [elpa] master da9852a 053/177: {snippet-development, faq}.org: fixup pandoc output, João Távora, 2015/03/28
- [elpa] master a9e3035 066/177: docstring fixes, João Távora, 2015/03/28
- [elpa] master eda8330 067/177: only /italicize/ words completely in upper case, João Távora, 2015/03/28
- [elpa] master 0f8007e 071/177: Simplify: index.org no longer repeats info in the README, João Távora, 2015/03/28
- [elpa] master 6927f69 069/177: minor: README.mdown link, João Távora, 2015/03/28
- [elpa] master 0a9885e 073/177: markup suffixed variable names, eg SUBEXPth, João Távora, 2015/03/28
- [elpa] master c61f81f 070/177: Closes #439: add a faq question about redefining keys,
João Távora <=
- [elpa] master 7d4e4aa 074/177: Closes #440: don't use `make-variable-buffer-local' for `yas--extra-modes', João Távora, 2015/03/28
- [elpa] master 582e368 072/177: minor: cosmetic fixes to manual, João Távora, 2015/03/28
- [elpa] master 7518cb4 075/177: rake doc:upload: check for wrong/incomplete rev, João Távora, 2015/03/28
- [elpa] master b944cc9 078/177: fix rake doc:upload, João Távora, 2015/03/28
- [elpa] master 90e7595 081/177: yas-text export twice, João Távora, 2015/03/28
- [elpa] master 46b4a02 079/177: doc:upload stylesheets/*.css to gh-pages, João Távora, 2015/03/28
- [elpa] master 6c752a1 080/177: populate yas--exported-syms based on sym prefix, João Távora, 2015/03/28
- [elpa] master ba0b02f 082/177: Merge pull request #446 from dongxiong/patch-2, João Távora, 2015/03/28
- [elpa] master d89e837 076/177: add top level menu, minimal styling, João Távora, 2015/03/28
- [elpa] master 260ecf9 077/177: fix a faq title, João Távora, 2015/03/28