ido-mode

Stop tramp from opening remote directories when using ido-mode

*爱你&永不变心* 提交于 2020-01-04 05:33:08
问题 I have a problem with ido-mode. As I cycle through work directories (using M-n), one of the directories is inevitably on a remote server, which makes tramp start authenticating. I know I can edit the ido-work-directory-list-ignore-regexps variable, but maybe I'm misunderstanding that, or how it works with tramp. If the directory is someguy@example.com:/home/public/ what regexp should I use? 回答1: I would suggest trying this: (require 'ido) (add-to-list 'ido-work-directory-list-ignore-regexps

How do I change drive letter in ido mode (Emacs)?

社会主义新天地 提交于 2019-12-21 03:25:09
问题 I'm using Emacs on windows. My default folder is c:/home , but I want to edit my file in d:/ how to do it in ido mode ? I tried // but that put me in c:/ . Currently, I use C-f (change back to normal find file mode), but that defeat the purpose of using ido mode in first place.... 回答1: As stated in a comment you just type "d:/" in the minibuffer while in ido-find-file. You don't need to be at the start of the string, it's intelligent enough to know what you're trying to do. C-x C-f d:/ MyFile

Emacs: Switching Between Buffers with the Same Name but in Different Directories

夙愿已清 提交于 2019-12-19 06:57:53
问题 I have two files with the same name but in different directories: apples/main.cpp oranges/main.cpp I open them in one emacs window via emacs apples/main.cpp oranges/main.cpp When I use C-x b to switch between these two buffers, the buffer names are "main.cpp" and "main.cpp<2>". I would love to be able to see the full path of these two files when switching buffers, so that I may disambiguate between the apples and the oranges version. Is there a way to do this? One way could be to modify

How do I change drive letter in ido mode (Emacs)?

巧了我就是萌 提交于 2019-12-03 10:08:22
I'm using Emacs on windows. My default folder is c:/home , but I want to edit my file in d:/ how to do it in ido mode ? I tried // but that put me in c:/ . Currently, I use C-f (change back to normal find file mode), but that defeat the purpose of using ido mode in first place.... As stated in a comment you just type "d:/" in the minibuffer while in ido-find-file. You don't need to be at the start of the string, it's intelligent enough to know what you're trying to do. C-x C-f d:/ MyFile.txt will point you at the file D:/MyFile.txt 来源: https://stackoverflow.com/questions/4050913/how-do-i

Emacs ido-mode and creating new files in directories, it keeps changing the directory while I'm typing

一世执手 提交于 2019-12-03 05:32:18
问题 When using ido-mode in emacs, it tends to get in my way when I'm trying to create a new file inside a directory, using: C-x C-f ( start typing a new filename, which doesn't yet exist ) RET Ordinarily this should create a new file, but when I have ido mode, I have to type the new filename really quickly, otherwise ido-mode decides to move me into a directory that has a file with a matching name, causing me to open that file, instead of creating a new file. Does anybody know how to force ido

Emacs: Switching Between Buffers with the Same Name but in Different Directories

↘锁芯ラ 提交于 2019-12-01 04:43:57
I have two files with the same name but in different directories: apples/main.cpp oranges/main.cpp I open them in one emacs window via emacs apples/main.cpp oranges/main.cpp When I use C-x b to switch between these two buffers, the buffer names are "main.cpp" and "main.cpp<2>". I would love to be able to see the full path of these two files when switching buffers, so that I may disambiguate between the apples and the oranges version. Is there a way to do this? One way could be to modify whatever code generates the <2> after the second main.cpp when Emacs detects that a buffer with that name is

How can I have term.el (ansi-term) track directories if using anyhting other than bash

孤街浪徒 提交于 2019-11-30 21:00:18
When using eshell or ansi-term and bash emacs changes the default-directory variable depending on what directory you are in. So if I move to /home/user/code/project and then use ido-find-file to open a file it starts ido with the CWD. If I use ksh (my normal shell) or zsh (tried for testing) it doesnt work. Is there a setting or is this just supported under bash? Thanks Put this in your .zshrc: chpwd() { print -P "\033AnSiTc %d" } print -P "\033AnSiTu %n" print -P "\033AnSiTc %d" The chpwd() function is run every time the pwd changes. The line ending in %d is the one that allows you to track

How can I have term.el (ansi-term) track directories if using anyhting other than bash

梦想与她 提交于 2019-11-30 05:40:59
问题 When using eshell or ansi-term and bash emacs changes the default-directory variable depending on what directory you are in. So if I move to /home/user/code/project and then use ido-find-file to open a file it starts ido with the CWD. If I use ksh (my normal shell) or zsh (tried for testing) it doesnt work. Is there a setting or is this just supported under bash? Thanks 回答1: Put this in your .zshrc: chpwd() { print -P "\033AnSiTc %d" } print -P "\033AnSiTu %n" print -P "\033AnSiTc %d" The

Emacs recursive project search

自闭症网瘾萝莉.ら 提交于 2019-11-29 20:43:54
I am switching to Emacs from TextMate. One feature of TextMate that I would really like to have in Emacs is the "Find in Project" search box that uses fuzzy matching. Emacs sort of has this with ido , but ido does not search recursively through child directories. It searches only within one directory. Is there a way to give ido a root directory and to search everything under it? Update: The questions below pertain to find-file-in-project.el from Michał Marczyk's answer. If anything in this message sounds obvious it's because I have used Emacs for less than one week. :-) As I understand it,

Emacs recursive project search

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 16:50:32
问题 I am switching to Emacs from TextMate. One feature of TextMate that I would really like to have in Emacs is the "Find in Project" search box that uses fuzzy matching. Emacs sort of has this with ido, but ido does not search recursively through child directories. It searches only within one directory. Is there a way to give ido a root directory and to search everything under it? Update: The questions below pertain to find-file-in-project.el from Michał Marczyk's answer. If anything in this