summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-04-21 22:16:56 +0200
committerGravatar Tom Willemse2015-04-21 22:16:56 +0200
commit2fdc0fbf872ddaece9e36097f135892cad36584e (patch)
treef354f649f93302b14e85dd84bd70c7e73ae331fa /emacs
parent22084f3d92bc42c4d07115679394952ac164b83a (diff)
downloaddotfiles-2fdc0fbf872ddaece9e36097f135892cad36584e.tar.gz
dotfiles-2fdc0fbf872ddaece9e36097f135892cad36584e.zip
Add section on auto completion
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el4
-rw-r--r--emacs/.emacs.d/init.org44
2 files changed, 45 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index e804dec..f6d2308 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -929,9 +929,7 @@ from myaethon2.core.decorators import (
(auto-init avandu)
(stante-after auto-complete
- (add-to-list 'ac-modes 'slime-repl-mode)
- (setq ac-auto-show-menu nil
- ac-use-quick-help nil))
+ (add-to-list 'ac-modes 'slime-repl-mode))
(stante-after "bindings"
(setq mode-line-default-help-echo ""))
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
+ <<auto-complete-dont-show>>
+ <<auto-complete-no-quickhelp>>)
+ #+END_SRC
+
* Load custom file
I don't really use the Emacs customization interface much, but I