Hot answers tagged

48

After some research, I came across the company mode git hub ticket, which says that company mode uses dabbrev for plain text as backend. dabbrev has an option to downcase things, it is turned on by default but can be turned off: (setq company-dabbrev-downcase nil) Now all is well.


2

happily got the answer from author of company-mode It's company-dabbrev-char-regexp, not -abbrev-.


2

when you define a abbrev table, you can add a property to specify regex on what chars to look for. Example: (define-abbrev-table 'xah-elisp-abbrev-table '( ("d" "(defun f▮ ()\n \"DOCSTRING\"\n (interactive)\n (let (VAR)\n\n ))" nil :system t) ("i" "(insert ▮)" nil :system t) ("l" "(let (x▮)\n x\n)" nil :system t) ("m" "(message \"%s▮\"...


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. ...


2

See options dabbrev-case-fold-search and dabbrev-upcase-means-case-search: dabbrev-case-fold-search is a variable defined in `dabbrev.el'. Its value is case-fold-search This variable can be risky when used as a file-local variable. Documentation: Control whether dabbrev searches should ignore case. A value of nil means case is significant. A value of `...


2

-- this is meant to be a comment but I don't have enough reputation for it -- I did a quick test with emacs -Q I typed "showPublic" then "show M-/" and it completed as "showPublic" (emacs 24.4) so I think it might be a configuration problem. Could you retry editing your document in context while launching emacs with the -Q option? If the completion is ...


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