An open API service indexing awesome lists of open source software.

https://github.com/zk-phi/ac-c-headers

auto-complete source for C headers and symbols in headers
https://github.com/zk-phi/ac-c-headers

emacs

Last synced: 10 months ago
JSON representation

auto-complete source for C headers and symbols in headers

Awesome Lists containing this project

README

          

* ac-c-headers

auto-complete source for C headers

Cのヘッダをauto-completeで補完

** Screencast

[[screencast.gif]]

** Usage

Require this script (and auto-complete) then add to ac-sources.

: (require 'ac-c-headers)
: (add-hook 'c-mode-hook
: (lambda ()
: (add-to-list 'ac-sources 'ac-source-c-headers)
: (add-to-list 'ac-sources 'ac-source-c-header-symbols t)))

Header filenames and symbols in imported headers are completed.

: #include ]
: #include "p[ath/]t[o/]m[y_header.h"]

: pr[intf]

** Customization

ac-c-headers refers the variable =cc-search-directories= (defined in
built-in elisp "find-file.el") for a list of directories that may
contain header file(s).

Therefore, if you are using MinGW in Windows, following configuration
may be useful, for example.

: (when (string= (window-system) "w32")
: (add-to-list 'cc-search-directories "C:/MinGW/include/"))