« Back to Index

[vim debugging]

View original Gist on GitHub

Tags: #vim #debugging

vim debugging.vim

vim -D                  # starts vim in a step-debugger mode
:h map-listing          # show information about key bindings that have been mapped by either your .vimrc or other scripts
:scriptnames            # shows list of sourced script names, in the order they were sourced
:set runtimepath?       # shows list of directories which will be searched for runtime files
:verbose set <option>?  # shows where <option> was last set (e.g. :verbose set history?)
:set rtp+=<path>        # allows appending <path> to the runtimepath variable

# example mappings I use, and last item demonstrates a bug...

:map \\\                # mapped to a Commentary plugin command
:map <Leader>f          # mapped to :FZF<CR>
:map <C-i>              # incorrectly mapped to `gt` which is mapped to <Tab>!
:verbose map <C-i>      # this helps to identify where it was last set! `Last set from ~/.vimrc line 306`

# Although <C-i> indicates the mapping, the help file is CTRL-I (`:h CTRL-I`)