Fandom

Vim Tips Wiki

Use K to easily run a Windows program for the current word

Redirected from VimTip642

1,625pages on
this wiki
Add New Page
Talk0 Share
Tip 642 Printable Monobook Previous Next

created January 21, 2004 · complexity basic · author David Risner · version 6.0


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.

CommentsEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.