in reply to Re^2: Professional Toolkits <=> vim + shell
in thread Professional Toolkits <=> vim + shell

Autocompletion? What are you using for that?
  • Comment on Re^3: Professional Toolkits <=> vim + shell

Replies are listed 'Best First'.
Re^4: Professional Toolkits <=> vim + shell
by diotalevi (Canon) on Apr 13, 2006 at 19:13 UTC
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Autocomplete ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defadvice cperl-indent-command (around cperl-indent-or-complete) "Changes \\[cperl-indent-command] so it autocompletes when at the en +d of a word." (if (looking-at "\\>") (dabbrev-expand nil) ad-do-it)) (defun cperl-dabbrev-installer () (set (make-local-variable 'dabbrev-case-fold-search) nil) (set (make-local-variable 'dabbrev-case-replace) nil)) (eval-after-load "cperl-mode" '(progn (require 'dabbrev) (ad-activate 'cperl-indent-command) (add-hook 'cperl-mode-hook #'cperl-dabbrev-installer)))

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      Okay. The Eclipse fanboys will say that doesn't complete methods and such since it's just textual, but dabbrev works well in practice, and is a wonderful thing for all kinds of documents. btw, one nice trick I use for indent-or-complete commands is to complete on the second "TAB" when the line hasn't moved, rather than when at end-of-word, like so (pseudocode):
      (defun my-indent-or-complete () (interactive) (let ((pos (point))) (indent-command) (when (and (= pos (point)) (eq last-command 'my-indent-or-complete)) (complete-command))))