Use K to easily run a Windows program for the current word
From Vim Tips Wiki
(Redirected from VimTip642)
Tip 642 • Previous Tip • Next Tip
Created: January 21, 2004 Complexity: basic Author: David Risner Minimum version: 6.0 Karma: 13/8 Imported from: Tip#642
To get the K command to open a Windows program without creating a command prompt window that needs to be closed, you can do the following:
In your vimrc add:
map K yiw:exec "silent !".&kp." ".@0<CR>
You can then set the keywordprg (abbreviated kp above) to the program you want to run.
