Best way to extend parenthesis matching in EVIL to other symbols
I want to extend Evil's % command to work with matching $'s and delimiters like \left and \right (this is for working with latex). Would I need to modify the source for evil-jump-item directly, or is there some more modular way to do this, like advising the function? I'm Elisp savvy, so a high-level description is all I need. Thanks you for you time, Gordon Gustafson PS I sincerely apologize if I'm posting this is the wrong place :)
Will 'evil-define-key' suffice? You can check how % is redefined in evil-matchit plugin (https://github.com/redguardtoo/evil-matchit/blob/master/evil-matchit.el). Best, Sanel On Wed, 23 Oct 2013 17:29:19 -0400 gordon Gustafson <[email protected]> wrote:
I want to extend Evil's % command to work with matching $'s and delimiters like \left and \right (this is for working with latex). Would I need to modify the source for evil-jump-item directly, or is there some more modular way to do this, like advising the function? I'm Elisp savvy, so a high-level description is all I need.
Thanks you for you time,
Gordon Gustafson
PS I sincerely apologize if I'm posting this is the wrong place :)
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
I want to extend Evil's % command to work with matching $'s and delimiters like \left and \right (this is for working with latex).
Depending on how % is implemented (sorry, I'm not an Evil user nor hacker), hooking into forward-sexp-function is all that's needed. Stefan
On Sat, Nov 23, 2013 at 9:39 PM, Stefan Monnier <[email protected]>wrote:
I want to extend Evil's % command to work with matching $'s and delimiters like \left and \right (this is for working with latex).
(...) Maybe Smartparens <https://github.com/Fuco1/smartparens/wiki> is what you're looking for? Cheers, -- José A. Romero L. [email protected] "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)
Thanks for the link to smartparens. It looks nice. Does it work well with evil? On Sun, Nov 24, 2013 at 8:23 AM, José A. Romero L. <[email protected]>wrote:
On Sat, Nov 23, 2013 at 9:39 PM, Stefan Monnier <[email protected]>wrote:
I want to extend Evil's % command to work with matching $'s and delimiters like \left and \right (this is for working with latex).
(...)
Maybe Smartparens <https://github.com/Fuco1/smartparens/wiki> is what you're looking for?
Cheers, -- José A. Romero L. [email protected] "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Sun, Nov 24, 2013 at 3:07 PM, Tom Short <[email protected]> wrote:
Thanks for the link to smartparens. It looks nice. Does it work well with evil?
(...) I haven't used it extensively myself, but from what I've seen, smartparens and evil are mostly orthogonal to each other. You still need to use C-M-e, C-M-u, etc for navigation -- but that's the same story as when using nxml-mode, so I don't mind too much. Cheers, -- José A. Romero L. [email protected] "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)
José, thank you very much for the recommendation, `smartparens' is really cool, it is almost like I can paredit in c++-mode. York On Sun, Nov 24, 2013 at 11:44 AM, José A. Romero L. <[email protected]> wrote:
On Sun, Nov 24, 2013 at 3:07 PM, Tom Short <[email protected]> wrote:
Thanks for the link to smartparens. It looks nice. Does it work well with evil?
(...)
I haven't used it extensively myself, but from what I've seen, smartparens and evil are mostly orthogonal to each other. You still need to use C-M-e, C-M-u, etc for navigation -- but that's the same story as when using nxml-mode, so I don't mind too much.
Cheers, -- José A. Romero L. [email protected] "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
participants (6)
-
gordon Gustafson -
José A. Romero L. -
Sanel Zukan -
Stefan Monnier -
Tom Short -
York Zhao