DEV Community

Discussion on: What are your "must have" custom snippets for your editor/IDE?

Collapse
 
vonheikemen profile image
Heiker • Edited

I can be happy with snippets just for function definition, ifs and console.log.

While using a pluginless vim these abbreviations are timesavers:

:iabbrev <buffer> con@ console.log();<Left><Left>

:iabbrev <buffer> vd@ echo var_dump(); die();<Esc>2F)i

:iabbrev <buffer> fun@ function() {<CR>}<Esc>%F(i

:iabbrev <buffer> if@ if() {<CR>}<Esc>%<Left><Left>i