Skip to content

jssee/vim-infest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

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:

call minpac#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 flavors
call minpac#add('jssee/vim-infest', {'type': 'opt'})
augroup infest_file
  autocmd!
  autocmd FileType *.js,*.ts,*.jsx,*.tsx packadd vim-infest
augroup END

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published