Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

vim-infest

vim-infest is a simple set of functions that allow you to debug your code lickity-split.

Installation

you can install the plugin using whatever package/plugin manager you want, here is an example using minpac:

callminpac#add('jssee/vim-infest')

This plugin is really specifically made with javascript coding in mind so optionally, you can take a more involved approach and choose to only load the plugin for javascript and its different variants:

" only load infest for javascript files and its various flavorscallminpac#add('jssee/vim-infest', {'type': 'opt'})
augroupinfest_fileautocmd!autocmdFileType*.js,*.ts,*.jsx,*.tsxpackaddvim-infest
augroupEND

Usage

There are 3 functions and 1 command included. Default mappings are intentionally not provided.

InfestStatement

Places a debugger statement in the line below the current line.

nmap<key><Plug>(infest_statement)

InfestCword

take the word under the cursor, wrap it in a console.debug statement, place it on the line below.

nmap<key><Plug>(infest_cword)

InfestPrompt

prompts for a message, wrap that message in a console.debug() statement, place it on the line below.

nmap<key><Plug>(infest_prompt)

InfestRaid(!)

this command is meant to cleanup all the debugger andconsole.debug statements in the current buffer. You have to confirm this action unless you invoke it with a !

:InfestRaid(!)

About

Debug your (javascript) code lickity-split

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages