... From: Wolfgang Schmidt To: Sent: Tuesday, August 30, 2005 12:10 PM Subject: save as functionality under windows / create own
Message 1 of 2
, Aug 30, 2005
----- Original Message -----
From: "Wolfgang Schmidt" <hak@...>
Sent: Tuesday, August 30, 2005 12:10 PM
Subject: "save as" functionality under windows / create own distribution?
> Hi there,
> I've just switched from Emacs to Vim, because I often have to work on
> remote machines and it's difficult sometimes to transfer a complete Emcas
> environment to a remote machine.
> I got a problem using the "save as" functionality using Windows: while
> under *n*x e.g.
> :w /devel/mydir/%
> does work as expected (saves the currently edited file in another
> directory with the same filename), this does not work under Windows:
> :w c:\Temp\%
> Instead, a file c:\Temp% is created. I think I pobably have to mask the %
> sign, but I don't know how. Can anyone help?
I assume you don't want the full path to the current file, but only the file
_name_, after C:\Temp
Method I: ":saveas C:/Temp/%:t" or ":w C:/Temp/%:t" (without the quotes and
with forward slashes)
Method II: "exe 'w c:\Temp\' . expand('%:t')" (without the double quotes but
with the single quotes). Here also, you can replace w by saveas. The
difference between ":w foobar" and ":saveas foobar" is that in the former
case your "current filename" doesn't change, in the latter it does.
See ":help filename-modifiers".
Note: the \% is used in Vim to mean "a real percent sign, not the current
file name" -- except where it can be put within single quotes.
> Another question: Is there a way of building my own vim bundle as
> self-installing executable? Distributions like Knoppix can
> be unpacked, modified and re-packed by users to create a personalized
> edition. All the time I install the Vim63-executable on remote Windows
> machines, I have to do some extra work to add modifications to the Vim
> installation, e.g. alternate Python indenting files, my _vimrc, additional
> programs like ctags etc. Of course I could just tar all files I need, but
> then I would have to create all Windows desktop links and menu entries
> manually. Is there a possibility to unpack a Vim bundle like the
> 63-Installer, modify it and repack it to get my own customized installer?
> Thanx in advance
There is, but I'm not sure how; you might want to check Steve Hall's vim
site http://cream.sourceforge.net/vim.html . In such cases it's better of
course to start with the latest revision of the files (Bram's self-installer
is 6.3.000; Steve's is currently 6.3.025; on my site http://users.skynet.be/antoine.mechelynck/vim/ you can get the latest
executables [currently 6.3.086] and a fairly recent set of runtime files;
plus a set of pointers to other interesting "vim" pages on the Web).
Your message has been successfully submitted and would be delivered to recipients shortly.
Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer.
We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.