help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to have yasnippet only for C/C++ files ?


From: Doug Davis
Subject: Re: How to have yasnippet only for C/C++ files ?
Date: Tue, 26 Mar 2019 11:46:58 -0400
User-agent: mu4e 1.1.0; emacs 27.0.50

Hi,

Check here:
https://github.com/joaotavora/yasnippet#use-yas-minor-mode-on-a-per-buffer-basis

Looks like you can do

(add-hook 'c-mode-common-hook #'yas-minor-mode)

Cheers,
Doug

jonetsu writes:

> I've installed the yasnippets package and I find it great for C/C++.
> However I have searched about how to enable it only for C/C++ files
> (mode) and have found nothing so far.  Many references about global
> mode, although I do not really want it to be global.
>
> So, how to enable yasnippets only for C/C++ files ?
>
> Thanks !



reply via email to

[Prev in Thread] Current Thread [Next in Thread]