The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
Google UNIX.COM


Windows & DOS: Issues & Discussions Questions involving Unix to Windows (Desktop or Server) go here. Any Windows/DOS questions should go here as well.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix format in gVim 68ST0X20 Windows & DOS: Issues & Discussions 1 05-31-2008 04:45 AM
gVim creates and leaves strange tilde ~ files in Windows ghbarratt Windows & DOS: Issues & Discussions 2 02-27-2008 09:19 PM
Traversing Pascal/Delphi code using GVim SankarV UNIX for Dummies Questions & Answers 0 02-22-2008 01:24 AM
how to add gvim in solaris 5.8 adityam SUN Solaris 1 11-24-2007 08:15 AM
Need to get Gvim on Linux enterprise frankkahle Linux 1 08-23-2005 05:29 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-08-2007
milhan's Avatar
Registered User
 

Join Date: Oct 2002
Location: /home
Posts: 121
Question 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..
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-08-2007
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,503
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.
Reply With Quote
  #3 (permalink)  
Old 02-08-2007
milhan's Avatar
Registered User
 

Join Date: Oct 2002
Location: /home
Posts: 121
Quote:
Originally Posted by reborg
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
Code:
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,
Reply With Quote
  #4 (permalink)  
Old 02-08-2007
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,503
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.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0