vim check if a key is mapped
# Check built-in commands
:help index
# List all key mappings
:map
:nmap # Prefix with "n", "v", "i", etc for mode-specific mappings
# Check key mappings method #1: "verbose" command
:verbose {map} {cmd}
# e.g. check if "K" is mapped in normal mode
:verbose nmap K
# Check key mappings method #2: "mapcheck" function
# Same example. Use :help mapcheck for full details
:echo mapcheck("K", "n")