I've installed auto-complete inside emacs using elpa and have used M-x auto-complete-mode to check that it is enabled. However when I write the following short C code in emacs and put my cursor in front of the v and press the TAB key nothing happens.
Is this not the correct key or is there something wrong with my setup?
int main(void){
varA = 5;
varB = 7;
v
return 0;
}
The contents of my .emacs.d/elpa/ directory are:
- archives
- auto-complete-20160329.2321
- popup-20160409.2133
And my emacs.d/init.el contains
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
(require 'auto-complete)
(global-auto-complete-mode t)
(require 'auto-complete-config)
(ac-config-default)
v
?v
caused nothing to happen, typingva
and putting my cursor after that brought up the auto-complete window, Thanks!