简体   繁体   English

emacs Jedi disable#

[英]emacs Jedi disable #

I have a working version of JEDI with Emacs 24.3 on osx. 我在osx上具有带有Emacs 24.3的JEDI的工作版本。 The autocomplete feature is wonderful, except for when I want to comment things out! 自动完成功能很棒,除了我想注释掉! I frequently comment/uncomment portions of my code and was hoping there was a way to prevent JEDI's auto completion from coming up when I type #. 我经常注释/取消注释我的代码部分,希望当我输入#时,有一种方法可以阻止JEDI的自动完成功能。 Any advice or thoughts would be greatly appreciated! 任何建议或想法将不胜感激!

edit: When I go to comment multiple lines I enter in # typically followed by DownArrow and LeftArrow, but what usually happens with JEDI enabled is this dialog pops up preventing me from moving to the following line until I make a selection: 编辑:当我要注释多行时,我通常在#中输入#,然后输入DownArrow和LeftArrow,但是启用JEDI时通常会发生此对话框弹出,阻止我在选择之前移至以下行: 弹出的对话框

You can try to use company-jedi for your python completion. 您可以尝试使用company-jedi来完成python。 This package doesn't have this problem. 这个软件包没有这个问题。

One way to get around this issue would be to select the lines (region) you would like to comment out and hit M-; 解决该问题的一种方法是选择您要注释掉的行(区域),然后按M-。 . This runs the command comment-dwim which comments out the selected region (or uncomments it, if it is currently commented out). 这将运行命令comment-dwim ,该命令comment-dwim所选区域(如果当前已注释掉,则取消注释)。

When used in conjunction with eg mark-lines which allows you to select the current line with a single key stroke, this makes for a really fast way of (un)commenting portions of your code, even if they span just one or two lines. 当与例如mark-lines结合使用时,它使您可以通过一次击键选择当前行,这使您可以真正快速地对代码的各个部分进行(取消)注释,即使它们仅占一行或两行。

emacs-jedi dev here. emacs-jedi开发人员在这里。 If emacs-jedi works as you describe, then that's a bug. 如果emacs-jedi可以按照您的描述工作,那就是一个错误。

But I cannot say what is wrong from the limited information I have. 但是我不能从有限的信息中说出什么问题。 So, just general directions: 所以,只是一般的指示:

  1. First, always try to reproduce the misbehavior in a clean Emacs setting, described here http://tkf.github.io/emacs-jedi/latest/#quick-try 首先,请始终尝试在干净的Emacs设置中重现不良行为,如此处所述: http://tkf.github.io/emacs-jedi/latest/#quick-try

    This helps you to find out if your setting is wrong or if it is actually a bug in emacs-jedi. 这可以帮助您确定设置是否错误或实际上是否是emacs-jedi中的错误。

  2. Give the output of Mx jedi:show-version-info . 给出Mx jedi:show-version-info的输出。 http://tkf.github.io/emacs-jedi/latest/#jedi:show-version-info http://tkf.github.io/emacs-jedi/latest/#jedi:show-version-info

    This helps people diagnosing the problem. 这可以帮助人们诊断问题。

  3. This is a guess from your screenshot but it seems that you have old version of popup.el. 这是您的屏幕截图中的猜测,但您似乎使用的是旧版本的popup.el。 So maybe auto-complete.el could be old one if you install them at the same time. 因此,如果同时安装auto-complete.el可能会很旧。 If you don't see the problem in the clean Emacs (step 1. I mentioned above) which installs newest libraries, then updating them could solve the problem. 如果您在安装最新库的干净Emacs(步骤1,我在上面提到)中没有看到问题,那么更新它们可以解决问题。

Update 更新

So, I found a way to reproduce the behavior which is close to what you mentioned: https://github.com/tkf/emacs-jedi/issues/147 因此,我找到了一种重现您所提到行为的方法: https : //github.com/tkf/emacs-jedi/issues/147

But as I wrote in the issue, I think it is a rare case. 但是正如我在本期杂志中所写,我认为这是一种罕见的情况。 If you find a case which could happen very frequently, then let me know. 如果您发现可能经常发生的情况,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM