Ingo Karkat wrote: > > What's the best way (on Windows) to open a file from vim in whatever > > Windows normally uses to open that file? For example, :!% will open > > the current file, but it leaves a DOS window handing around while the > > file is open, which requires a hit-enter to get rid of after closing > > the file. > > > > You also can't use vim until the file is closed in the external > > program. If I try ":!start %" to make them asynchronous, then it > > doesn't know how to open "%". If :!% knows to use "cmd /c", shouldn't > > ":!start %" know the same thing? > > > > The best way seems to be ":!start cmd /c %", but now the script will > > only work on Windows. There's also an annoying DOS window hanging > > around in the background. Any way to get rid of that? > > > > I can't find a scripting function to open a given file however the OS > > sees fit. > > Use ":silent ! start %"; the 'silent' will close the DOS window > immediately.
Ah, thanks. It's the space after the "!" that makes it work as I needed! Weird. I've used this to make K jump to help for PHP commands, inspired by a tip to do the same thing on unix: http://dailyvim.blogspot.com/2008/08/making-k-useful.html My version for Windows is attached and does not require an external DOS script. Just put it in your $VIM\vimfiles\ftplugin folder. Rob. -- Robert Webb <[EMAIL PROTECTED]>, MineSweeper3D - Take Minesweeper to a whole new dimension! http://www.software3d.com/Mines3D --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
php_help.vim
Description: Binary data
