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

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

Re: Do I have a correct configuration for auto-complete, auto-indent and


From: lee
Subject: Re: Do I have a correct configuration for auto-complete, auto-indent and yasnippet to use the tab key?
Date: Wed, 19 Mar 2014 08:51:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Jorge Araya Navarro" <kartelo@gmx.com> writes:

> Hello!
>
> I am a happy user of GNU Emacs. So far I have a really good
> configuration on my Emacs, but I have the impression that
> auto-complete mode, auto-indent mode and yasnippet mode are not
> working together as they should to not enter into conflict when the
> tab key is pressed. For instance, when I'm writing python code, I
> usually press the tab key to auto complete the name of some variable,
> however, Emacs does nothing and if I press the key again it change the
> indentation, and if I press the tab key again, it changes the
> indentation again, and so on. If I write a word like the if statement
> yasnippet does nothing. This not happen for the for loop statement,
> and def statement though.

It would depend on which versions of auto-complete and yasnippet you`re
using.  I had to install them from their repos on github because there
was an incompatibility.  See


https://github.com/capitaomorte/yasnippet
https://github.com/auto-complete/auto-complete


Other than that, what your TAB key does would depend on what it`s bound
to.  In my case, it`s bound to `yas-expand', probably because I have .  It does 
what I think it
should.  I`m still working on figuring out all the possibilities with
these modes, though.


;; yasnippet /w autocomplete
;;
(add-to-list 'load-path "~/emacs/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)

(add-to-list 'load-path "~/emacs/auto-complete")
(require 'auto-complete-config)
(ac-config-default)
(setq ac-menu-height 20)


-- 
Knowledge is volatile and fluid.  Software is power.



reply via email to

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