Emacs - tab-completion of local Python variables

前端 未结 6 1723
失恋的感觉
失恋的感觉 2020-12-04 12:31

Is there a good emacs mode that will allow tab-completion of local python variables? I set up ipython.el but it will only tab-complete things in the scope of the interpreter

6条回答
  •  臣服心动
    2020-12-04 13:21

    M-/ runs the command dabbrev-expand . This will complete local names in any mode. Also I bind meta f1 to hippie expand from all open buffers. This is very useful for me.

    ;; Bind hippie-expand
    (global-set-key [(meta f1)] (make-hippie-expand-function
                                   '(try-expand-dabbrev-visible
                                     try-expand-dabbrev
                                     try-expand-dabbrev-all-buffers) t))
    

    Hope this is useful.

提交回复
热议问题