Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure hippie-expand for emacs?

Tags:

emacs

I would prefer that hippie-expand behaves more like the completion in Sublime. For example if I expand

As 

I would like to get just

Assign  

but hippie-expand gives me

Assign.new(:y, Add.new(Variable.new(:y), Number.new(3))))

Is it possible to change this ?

like image 940
rogergl Avatar asked Dec 23 '13 18:12

rogergl


1 Answers

Ok it seems as if the following does exactly what I want:

(global-set-key (kbd "M-/") (make-hippie-expand-function
                           '(try-expand-dabbrev-visible
                             try-expand-dabbrev
                             try-expand-dabbrev-all-buffers) t))
like image 104
rogergl Avatar answered Oct 31 '22 21:10

rogergl