XP 下 GVim 工作目录问题
用GVim打开文件,工作目录就是文件所在目录。
点击桌面上快捷方式打开GVim,工作目录是桌面,用 :pwd 命令检测。
把快捷方式加到桌面任务栏的快速启动栏中,“一般”情况下,快速启动的GVim工作目录是 ~ 下,也就是用户目录下。
但是如果你打开过 Windows字体目录(C:\WINDOWS\Fonts),之后再用快速启动打开GVim,工作目录会变成 C:\WINDOWS\Fonts ,多少次都是如此。重启后会恢复正常。
因为GVim安装后默认添加的桌面快捷方式属性中只有目标位置,而起始位置为空,这里面起始位置就会被设定为起始的工作目录(一开始的,如果打开文件,工作目录就会被修改为文件所在目录)。将快捷方式属性中的起始位置设置后,快速启动的GVim的工作目录就是设置的位置。
我的猜测:在快捷方式属性起始位置为空的情况下,在未打开 Windows字体目录前,Windows 会将快速启动栏中程序默认工作目录设置为用户目录,但是在打开 Windows字体目录后,快速启动栏中程序默认的工作目录就变成了 Windows字体目录。不知道算不算一个 bug。
这里当然也学到了一点收获,那就:生成快捷方式的时候,不要留空起始位置属性
Jan 10, 2013 06:23:36 AM
其实真正的原因是在留空的时候,新的进程会继承父进程的当前工作目录。
你开了一个explorer,自然工作目录就是explorer显示的那个了……
这很正常……
Jan 10, 2013 10:42:58 AM
@亚弥: 从快速启动栏中启动的程序继承的工作目录(如果起始位置留空)只是特定的几个目录,而非 explorer 打开的目录,如果打开过 C:\Windows\Fonts,而且这就像一种感染,持续性的。我测试过, win7 快速启动栏也有这种情况。
Jan 10, 2013 10:45:52 AM
@亚弥: 打开过 C:\Windows\Fonts ,之后关闭,再打开其他目录并没有效果,默认打开的gvim 工作目录还是字体目录
Sep 25, 2022 02:34:51 PM
To gain a thorough understanding of the topic, every student in sixth grade must study their first language, English. Self-practice and frequent review will have a significant influence on students' test performance at both the board and school levels. CBSE Class 6 English Question Paper For Class 6th Standard Term 1 & Term 2 and Regular Exams, the CBSE Board has developed a Sample Paper to help students understand the new or updated test structure.
Jun 12, 2023 03:24:49 PM
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. 토토사이트
Jun 19, 2023 01:44:09 PM
I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. 인천출장마사지
Aug 21, 2023 02:20:36 AM
I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer.Thanks. BLACKHORN 209 POWDER
Aug 29, 2023 04:55:30 PM
I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues. เว็บแทงบอลดีที่สุดUFABET
Sep 07, 2023 02:06:42 AM
I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. bubbles game
Sep 17, 2023 01:05:41 AM
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. Double carport nz
Oct 07, 2023 06:38:12 PM
I invite you to the page where you can read with interesting information on similar topics. <a href="https://www.cbdflex.com/product/30ct-cbd-gummy-bears-300mg/">Buy CBD Gummy Bears</a>
Oct 09, 2023 01:43:38 PM
thanks this is good blog. LIFT DETOX CAPS
Oct 26, 2023 01:00:18 AM
Attractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. After all, I will surely subscribe to your feed, and I hope you will write again soon! Private key recovery
Nov 02, 2023 05:26:34 PM
A very excellent blog post. I am thankful for your blog post. I have found a lot of approaches after visiting your post. Sajta de Pollo
Nov 03, 2023 02:23:59 PM
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. wallpaper singapore
Nov 14, 2023 01:28:18 PM
The pencils are stars, and the packaging is the grand stage – enhancing the overall experience. pencil packing work from home
Nov 17, 2023 12:00:25 AM
Hi there! Nice post! Please tell us when I will see a follow up! temazepam te koop
Nov 25, 2023 02:22:48 PM
Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards, crimsafe logan
Dec 22, 2023 09:20:31 PM
Wonderful blog! I found it while surfing around on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Appreciate it. roket288
Dec 24, 2023 07:58:20 PM
An fascinating discussion is value comment. I think that it is best to write extra on this matter, it won’t be a taboo topic however generally people are not enough to talk on such topics. To the next. Cheers fake id belgie
Dec 26, 2023 01:41:30 AM
Such sites are important because they provide a large dose of useful information ... <a href="https://metric-calculator.com/convert-cu-cm-to-gal.htm">cu cm to gal</a>
Jan 07, 2024 04:10:41 PM
Good post but I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit further. Appreciate it! hasch online
Jan 16, 2024 02:44:02 PM
Great webpage brother I am gona inform this to all my friends and contacts
Jan 20, 2024 09:16:05 PM
I can recommend primarily decent and even responsible tips, as a result view it: profile-backlinks
Feb 02, 2024 10:19:24 PM
Astounding, this is awesome as you need to take in more, I welcome to This is my page. concierge doctor naples
Feb 09, 2024 01:55:45 PM
This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!. hasch online
Feb 22, 2024 08:44:22 PM
Oh my goodness! an excellent post dude. Thanks However We’re experiencing problem with ur rss . Don’t know why Can not sign up to it. Possibly there is any person getting identical rss problem? Anybody who knows kindly respond. Thnk
Jul 14, 2024 05:41:06 PM
Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. OK Win
Dec 23, 2024 10:50:22 PM
I've been following your blog regularly, and I just wanted to say keep up the great work! It's one of the best blogs I've come across. επιλεξιμότητα για βίζα της Τουρκίας πολίτες του Ομάν
Mar 02, 2025 10:54:56 PM
Your layout is so intuitive, well done togel sgp hari ini
Mar 05, 2025 04:19:30 AM
You’re on the right track, keep pushing boundaries بهترین سایت تخته نرد شرطی
Apr 13, 2025 06:55:16 PM
This feels so modern and elegant, great job US Visa for Swiss Citizens
Apr 23, 2025 04:13:31 AM
I’m in awe of your talent, let’s join forces NEW ZEALAND VISA FOR IRISH CITIZENS