From 2fdc0fbf872ddaece9e36097f135892cad36584e Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 21 Apr 2015 22:16:56 +0200 Subject: Add section on auto completion --- emacs/.emacs.d/init.org | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'emacs/.emacs.d/init.org') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 0f2913e..31e35e7 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1222,6 +1222,50 @@ (add-hook 'scss-mode-hook #'electric-pair-local-mode) #+END_SRC +** Auto completion + + #+BEGIN_SRC emacs-lisp :tangle no + (depends-on "auto-complete") + #+END_SRC + + I'm not a great fan of any type of auto completion functionality in + programming. I think it's basically only good for getting really + long names in your file faster. I started programming in C#, in + Visual Studio, and they have their very powerful Intellisense + mechanism, which I used a lot. What I noticed though was that it + was keeping me from learning the APIs. Whenever I wrote some code, + all but the most basic and most-used calls I wrote from memory. + Many others were done after a few seconds of browsing through the + Intellisense pop-up. + + Because of this, I disable the normal auto-complete pop-up. + + #+NAME: auto-complete-dont-show + #+BEGIN_SRC emacs-lisp :tangle no + (setq ac-auto-show-menu nil) + #+END_SRC + + On the rare occasion that I do call up the pop-up to see what the + completions I have available to me are, I don't want it to show the + quick help. The quick help usually shows up as a big extra pop-up + next to the completion list and it gets very messy when combined + with some other modes that add overlays to the buffer. + + #+NAME: auto-complete-no-quickhelp + #+BEGIN_SRC emacs-lisp :tangle no + (setq ac-use-quick-help nil) + #+END_SRC + + To keep the byte-compiler from complaining about undefined + variables, I only want this to be done after =auto-complete= is + loaded, not sooner. + + #+BEGIN_SRC emacs-lisp :noweb yes + (stante-after auto-complete + <> + <>) + #+END_SRC + * Load custom file I don't really use the Emacs customization interface much, but I -- cgit v1.2.3-54-g00ecf