diff options
-rw-r--r-- | tag-emacs/emacs.d/init.org | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index b28107fb..24888f97 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -775,30 +775,12 @@ Directional window movement Make built-in completion a bit more intelligent, by adding substring and initial-based completion and ignoring case. -** TODO With =tab-always-indent=, do I need smart-tab anymore? - #+BEGIN_SRC emacs-lisp (setq completion-styles '(basic initials partial-completion substring) completion-ignore-case t tab-always-indent 'complete) #+END_SRC -*** Smart-tab - -Most editors use tab for both completion and indentation. Smart-tab -tries to do the right thing depending on the location of the point and -the line’s current indentation. - -#+BEGIN_SRC emacs-lisp -(use-package smart-tab - :commands (global-smart-tab-mode) - :init (global-smart-tab-mode) - :diminish smart-tab-mode - :config (progn - (nconc smart-tab-completion-functions-alist '((php-mode . php-complete-function))) - (diminish 'smart-tab-mode ""))) -#+END_SRC - *** Company The main choices for automatic completion in Emacs are company and @@ -806,20 +788,21 @@ auto-complete-mode. I’ve not tried auto-complete-mode as company seems to work perfectly well for me. #+BEGIN_SRC emacs-lisp -(use-package company - :commands (company-mode) - :diminish "Cmpl" - :bind (("C-<tab>" . company-complete)) - :init (progn - (add-hook 'prog-mode-hook #'company-mode) - (setq company-backends '(company-tern (company-elisp company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-gtags company-dabbrev-code company-etags company-keywords) - company-oddmuse company-files company-dabbrev) - company-idle-delay .3 - company-begin-commands '(self-insert-command) - company-auto-complete #'company-explicit-action-p - company-auto-complete-chars '(?\ ?\( ?\) ?.) - company-tooltip-align-annotations t - company-dabbrev-downcase nil))) + (use-package company + :commands (company-mode) + :diminish "Cmpl" + :bind (("C-<tab>" . company-complete) + ("TAB" . company-indent-or-complete-common)) + :init (progn + (add-hook 'prog-mode-hook #'company-mode) + (setq company-backends '(company-tern (company-elisp company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-gtags company-dabbrev-code company-etags company-keywords) + company-oddmuse company-files company-dabbrev) + company-idle-delay .3 + company-begin-commands '(self-insert-command) + company-auto-complete #'company-explicit-action-p + company-auto-complete-chars '(?\ ?\( ?\) ?.) + company-tooltip-align-annotations t + company-dabbrev-downcase nil))) #+END_SRC * Dates & Times |