Home

Awesome

vim-printer

Quickly print/log the variable in your favourite language

Installation

Use your favourite plugin manager to install. I use vim-plug.

Plug 'meain/vim-printer'

Usage

There is two keybinding in each normal mode and visual mode. In normal mode it works on current word under cursor and in visual mode it works on the visual selection.

Configuration

You can change the default keybindings like below. It will be used both in normal mode and visual mode.

let g:vim_printer_print_below_keybinding = '<leader>p'
let g:vim_printer_print_above_keybinding = '<leader>P'

You can add new languages or override existing by using:

The text inside {$} will be replaced by the variable

let g:vim_printer_items = {
      \ 'javascript': 'console.log("{$}:", {$})',
      \ }

Future TODO

Alternatives