On Fri, Jan 05, 2007 at 12:35:57PM -0800, Marc Bernstein wrote:
> I have cygwin and xp needs for editing files on xp. In addition most
> of the scripts I edit are destined for use on unix and possibly
> windows as well (Perl).<br><br>After extensive search I am still
> looking for a cogent explanation about how best to setup the xp
> environment for seamless use of gvim, either opened from explorer or
> cygwin command line.
>
> I presume this has to do with common use of vimfiles and coordinated
> use of environment variables but am confused
>
> [...] because I
> cant seem to get the thing to work as expected.<
It does help much if you tell us in which way your expectation differs
from the real world.
First of all you have to know that much vim behaviour is contcrolled by
scrpts. If you know which scripts are lodaded you get a better idea
whats going on. cywin has set the $HOME environment variable. Thus
if you start a windows vim
from windows
it will source
C:\Dokumente und Einstellungen\<your_name>\_vimfiles
(sorry don't know the english named path)
from cygwin
it will source
/<cypwinhome>/home/_vimfiles (try echo $HOME to get the
path)
also it will source by default another script mapping C-v C-x ..
if you start vim compiled with cygwin it will (never used this version
on windows) to read scripts from $HOME/.vim ...
seee :h 'clipboard (unnamed to automatically copy selection)
Consider using a tool like virtalwin to manage many windows and map the
sceens to Win-1 Win-2 .. Win-9 ;) (thats my style of working *lol*)
How to seamlessly use vim integrated in windows?
Open files ----- :
Files are opned in windows in general by
starting the application
a) File -> lead/open menu
b) drop the file using drag & drop (see :h drag to know how to
split or change current directory this way )
c) using file associations
* double click / right click on the file and choose open
* open with
If you need a description how to change these settings
give me a reply
This might be an option, too:
using a icon to drop a file on that (eg create a link to vim on your
desktop, press Win-d (minimize all windows) and move the file on the
icon, then this file will be appended to the gvim arguments thus be
opened.
Press Win-r enter gvim (I assume gvim.exe is in $PATH) and move files
onto the entry.. This is much faster then clicking throug the start
menu..
and ... don't use explorer but total-commander .. you need some time
to learn shortcuts but its much nicer to work with..
Open files from within vim: There exist many possibilities which has
already been discussed yet. You should be able to find them by searching
the mailinglist archive.
in short
Use :e **/*<YourFile> to expand path automatically matching a filename
(I've cmapped **/* ;)
Use :Explore ? ( perhaps netrw script which seems to be better ?)
Most important: To get the last opened file simply press C-o twice (use
mru script (most recent files) and / search to opene files you konw you
were editing some time ago.. and map :MRU to a combination such as
noremap <c-m-o><c-m-r> :MRU<cr>/<enter regex here )
...
Perl ?
I can't tell you much about perl as I've nearly never used it..
if gf command is an issue you can try my gfHandler where you can
customize this behaviour (
http://mawercer.de/marcweber/vim/vimlib/installers/vimlib_gfhandler_installer_sourceme.vim,
short description :
http://mawercer.de/marcweber/vim/vimlib/docs/vl_ui_navigation_gfHandler_vim.html
)
HTH
Marc