代码之家  ›  专栏  ›  技术社区  ›  steglig

ido中带空格的路径(查找文件)(在MS Windows上)

  •  1
  • steglig  · 技术社区  · 17 年前

    ido-find-file 匹配包含空格的文件。

    在我的.emacs中,我 (setq ido-use-filename-at-point t) "D:\Dokumente und Einstellungen\Username\Eigene Dateien\Scratch\ipswitch.bat" 打 C-x C-f .

    " 和 D:\ 我建议 d:/Dokumente[Dokumente und Einstellungen]

    我希望整个字符串(如果有必要,可能限制为某些模式(如组织模式))被匹配和建议。

    我怎样才能让它工作呢?

    1 回复  |  直到 17 年前
        1
  •  0
  •   gregoryg    15 年前

    ;; EXPERIMENTAL: unbind SPACE and ? in minibuffer, to allow typing in completions with those chars
    (add-hook 'minibuffer-setup-hook (lambda () 
                                       (define-key minibuffer-local-completion-map " " nil)
                                       (define-key minibuffer-local-must-match-map " " nil)
                                       (define-key minibuffer-local-completion-map "?" nil)
                                       (define-key minibuffer-local-must-match-map "?" nil)))
    

    该评论警告说,这是“实验性的”,因此我可以在遇到奇怪行为时将其反转。但是我已经用了一年多了,没有任何问题。

    现在当我这么做的时候 C-x C-f C:/Doc

    ido模式表明 C:/Documents and Settings/