Vim: Powerful “Shift + K”

Bruce Wen
Code.Art
Published in
6 min readAug 17, 2021

--

Most Vim users know the shortcut Shift + K, this article is to tell a bit more than what they know.

Photo by Syed Ali on Unsplash

Brief Introduction

When you open Vim and start to program or reading code, you can type Shift + K when you have cursor on some word. For example, when you see below code in one Python script file:

You might not know what’s argparse and how to use it. Then, you can type Shift + K to show Python document about it without exit Vim. (P.S. By using the plugin somini/pydoc.vim, we can open the Python help document in new buffer.)

Figure 1 — Help Document on Python Module ‘argparse’

So, that means Shift + K can be used not only for Vim help document, but also for any available help document in system for current file type.

Another example, when you program Bash script and want to check document about the command grep, then you don’t need to switch to another terminal window to type man grep, instead, you just need to…

--

--