On 09/05/11 12:58, sbq wrote:
Here is my weird experience. I want to modify fzdefaults.xml, a
FileZilla config file located in the Windows 7 directory C:\Program
Files\FileZilla FTP Client. Here's what happened.
1. In Windows Explorer select fzdefaults.xml
2. right-click, in the context menu select "Edit with Vim"
3. change the file.
4. write it out (:wq) exiting Vim
5. repeat steps 1-4 to verify the change is in the file. gVim shows
the change
6. run FileZilla
7. The configuration change does not work!
8. Repeat steps 1-4 to verify change is in the file. gVim shows the
change
9. Examine file with Notepad. The change is not there.
gVim is showing me the wrong contents of the file -- not what is on
the disk.
Once I realized what was going on, I was able to change the file by
starting gVim using "Run as administrator". This time it worked, but
this situation really faked me out.
Why is gVim showing me the wrong contents of the file? That is a bug,
right?
I seem to remember Win7 (and Vista?) doing some sort of
behind-the-scenes remapping of files so that if you tried to edit
something in a protected area like "\Program Files", it would
redirect the reads/writes into some user-space area. My
google-fu is apparently broken as I don't seem to be able to turn
up anything of the like to corroborate this, but I suspect this
is an artifact of Win7 trying to prevent you from touching files
it "shouldn't". To edit files in protected areas, you need to
run as admin. So Vim is likely editing a file that (to the OS)
exists in something like like "%USER%\Application
Data\FileZilla..." but to Vim looks like it's in "\Program
Files"; and then when FileZilla starts up, it's not looking in
the same/redirected place.
-tim
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php