New answers tagged

0

What are you using for showing command completions? That looks a like which-key. If that's the case, I think you should modify which-key-idle-delay: Delay (in seconds) for which-key buffer to popup. This variable should be set before activating which-key-mode. A value of zero might lead to issues, so a non-zero value is recommended (see https://github....


0

Thanks! wonderful it works exactly as stated. my main problem was the file "history" from savehist...again. after i delete my history file now its running. Regards Poul


0

This answer is for using command icicle-find-file-absolute, which is similar in most regards to icicle-locate. But icicle-locate uses a prefix arg differently, passing it to system-command locate. So icicle-locate doesn't handle the use of a prefix arg to make multi-completion candidates include also a last modification-date middle component. (Command ...


0

I don't know if this is the best solution, but it works. (defun evil*-complete-previous () (interactive) (let ((old (string (char-syntax ?_)))) (modify-syntax-entry ?_ "w") (evil-complete-previous) (modify-syntax-entry ?_ old))) (define-key evil-insert-state-map (kbd "M-p") 'evil*-complete-previous)


0

IIRC, Currently, the only way icomplete offers to control it is via icomplete-with-completion-tables which is rather inflexible. Of course, you could enable/disable it for specific commands by advising those commands and temporarily rebinding icomplete-with-completion-tables accordingly.


0

This is a modified version of @chen-bin's answer which uses a wrapper function instead of using advice (avoids interfering with other uses). It also generalizes the syntax checking to allow checking for other kinds of syntax. (defun company-complete-common-use-context () (interactive) (let ( (faces-found (face-at-point nil t)) (faces-...


1

Insert below code into ~/.emacs to enable company-ispell in comment, (defun my-in-comment-p (pos) "Check whether the code at POS is comment by comparing font face." (let* ((fontfaces (get-text-property pos 'face))) (if (not (listp fontfaces)) (setq fontfaces (list fontfaces))) (delq nil (mapcar #'(lambda (f) ...


0

You can use hippie-expand: (setq hippie-expand-try-functions-list '(try-expand-line)) (global-set-key (kbd "C-;") 'hippie-expand) Now C-; should expand to the closest matching line. Repeating the command will get you all the matches. Finally, if you want a popup menu with the choices listed there are some hacky ways of plugging hippie-expand into company-...


2

Your completion-function is a function, but not a proper completion table (it does not obey all the expected behavior). I recommend you use completion-table-dynamic to build a proper completion table function from a function that simply lists all the possible completions. E.g. (defun my-completion-function (prefix) ;; You can just ignore the prefix '("...


2

abbrev can abbreviate text. Use a numeric argument to say how many words before point should be taken as the expansion. For example, to abbreviate the sentence "The cat and the mooon." as x, put the point at the end and do C-u 5 C-x a g x <RET> The emacs manual (info) for Abbrevs gives the details.


0

(defconst sample-completions '(("a" "a" "ɑ" "æ" "ɐ" "ɑ̃") ("f" "o" "r"))) (defun company-sample-backend (command &optional arg &rest ignored) (interactive (list 'interactive)) (case command (interactive (company-begin-backend 'company-sample-backend)) (prefix (and (eq major-mode 'fundamental-mode) (company-grab-symbol))) (...


Top 50 recent answers are included