Search code examples
vimvim-plugin

Key maping for the seeing_is_believing vim plugin


I'm trying to get seeing_is_believing plugin to work with my vim.

So far I was able to get the key mapping working to annotate to whole file and clear the annotations.

However now I'm stuck with Mark the current line for annotation section.

this is what is in the wiki page

enter image description here

My question is what does this key mappings means, (or how can I read these key mappings)

" Mark the current line for annotation
nmap <leader>m A # => <Esc>
" Mark the highlighted lines for annotation
vmap <leader>m :norm A # => <Esc>

Solution

  • nmap <leader>m A # => <Esc>
    

    Has nothing to do with the plugin, it just Adds a # => at the end of the line if you press <leader>m. (See :h leader).

    The first part of the mapping is the key sequence (<leader>m) to initiate the mapping, the second part defienes what it does A # => <Esc> A means go to insert mode at the end of the line. In insert mode # => is typed and then go back to normal with <esc>

    The second mapping nmap <leader>m A # => <Esc> does exactly the same, but for every line marked in the visual mode. (see :h :norm it does execute the following string as keypresses in the normalmode)