History Report a problem
Article Edit this page Discussion

Run native-Windows Vim from cygwin without a wrapper

From Vim Tips Wiki

(Redirected from VimTip972)
Jump to: navigation, search
 

Tip 972Previous TipNext Tip

Created: August 15, 2005 Complexity: basic Author: Tony Mechelynck Minimum version: 5.7 Karma: 9/7 Imported from: Tip#972


To run native-Windows Vim from cygwin, just create one or more of the following aliases (for instance in ~/.bash_profile). You may grab them by copy&paste via the clipboard:

alias vim='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim63/vim.exe'
alias vimd='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim63/vimd.exe'
alias gvim='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim63/gvim.exe'
alias gvimd='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim63/gvimd.exe'

alias v7vim='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim70aa/vim.exe'
alias v7vimd='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim70aa/vimd.exe'
alias v7gvim='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim70aa/gvim.exe'
alias v7gvimd='VIM=`cygpath -d $VIM` HOME=`cygpath -d $HOME` `cygpath -u $VIM`/vim70aa/gvimd.exe'

Notes:

  • In each alias, the whole string after the first = is surrounded by single quotes
  • This assumes that $VIM and $HOME are correctly defined in the master environment. How to set them is outside the scope of this tip.
  • Today (while I'm writing this) the current Vim versions are 6.3 (stable) and 7.0aa (under development). Sooner or later there will be a newer version. Just change the last directory name in the above aliases to reflect it.
  • See 'man cygpath' for more info.

[edit] Comments

Due to spaces in directory names the aliases should be in the form:

alias gvim='VIM=`cygpath -d "$VIM"` HOME=`cygpath -d "$HOME"` "`cygpath -u "$VIM"`/vim63/gvim.exe"'

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Run native-Windows Vim from cygwin without a wrapper"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation