Make JavaScript logging in Vim great as it has never been

lol

imap cll console.log({ })<Esc>==F{a<space>
nmap cll yiwocll<Esc>p

deep breath

Yank the word under the cursor and open a new blank line below this line, run the cll command in insert mode which types a literal console.log({ }) and presses escape which returns to normal mode, return to the first instance of a character on this line and find the next instance of a left curly brace, and return to insert mode plus one character, type a space, then escape to return to normal mode and paste the original variablename.

Have an upboat you filthy vimmer. Of course Emacs already has this functionality with Ctrl+Alt+sfe+Butterfly.

/r/vim Thread