4

company-mode has a files backend:


3

I'm a bit confused by your question, because hippie-expand doesn't provide results in longest-to-shortest order, and it also doesn't provide "lowest common denominator" results which aren't actual completions, so there's no way for you to achieve your aim by any kind of re-ordering process, so you're actually looking for a different kind of functionality. ...


2

auto-complete also has this feature, via its built-in (ac-source-filename) backend. In addition, for c/c++, there is auto-complete-c-headers, see https://github.com/mooz/auto-complete-c-headers. Here is a screenshot of the latter:


2

@Dmitry made a great point that hippie-expand will do what I'm desiring when : is considered a punctuation character. It's obviously not ideal to just set (modify-syntax-entry ?: "." ruby-mode-syntax-table) in your init and call it a day, because then only some_action in :some_action is considered a symbol which would break expectations for other plugins. ...


1

It works fine with js-mode, org-mode and with html-mode. But with emacs-lisp-mode and with lisp-interaction-mode, hippie-expand always delegate completion to emmet-expand-line. It's a typo in your config: you're adding to emacs-lisp-mode instead of emacs-lisp-mode-hook. Emmet completion is still available in non-emmet'ified buffers after an emmet'ified ...


Only top voted, non community-wiki answers of a minimum length are eligible