gVim on Windows

Have you used gVim editor on Windows (xp)? I am talking about the GUI version of vim that you can click the icon on desktop and the gVim editor pops-up and you can create/edit files.

Here's my problem: When I use vim editor on cygwin to create/edit files the file creation mask is set to a specific value (in my case 077), so when I create/edit files, this file creation mask forces the file to be created within that mask.

However, when I open the gVim (by clicking the icon) and edit or create files it always overwrites the file permissions if the file already exists or when I create a new file, it sets the file permissions to some values that I don't like.

I am sure there is a way to tell gVim to comply to some specific file creation mask instead of a default. I made research online and tried to modify the .vimrc or _vimrc file but without success..

Does anyone know how to solve that problem..?

Thanks in advance..

If you mean when you open the file in the windows gVim it destroys the permissions, that is expected. Windows doesn't know about or understand the "Unix" permissions cygwin uses.

actually I thought about that.

Just as in unix/cygwin we place a

umask 077   # or some other value

in the .profile/.bash_profile to overwrite the file creation mask, is there also a similar config file on windows that we can modify the file creation mask? I realized Windows (gVim) always sets the file permissions to a specific value, which means it has a default..

regards,

No, it doesn't mean that it has a default in windows, it means that cygwin interprets a windows file as having a default set of permissions.

Take for example the execute bit, there is no equivalent in windows for that. Windows handles this on filename alone.

EDIT: just though of something...isn't there a gvim in the cygwin repositories?
If there is you could just run the cygwin X11 version of gvim and you'd have the menus et al. without having to worry about the windows behaviour.