Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sentriz/vim-print-debug
assisted printf debugging for vim
https://github.com/sentriz/vim-print-debug
debugging vim vim-plugin
Last synced: 16 days ago
JSON representation
assisted printf debugging for vim
- Host: GitHub
- URL: https://github.com/sentriz/vim-print-debug
- Owner: sentriz
- Created: 2020-08-22T15:36:02.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-21T12:05:47.000Z (over 2 years ago)
- Last Synced: 2024-10-03T12:35:17.479Z (about 1 month ago)
- Topics: debugging, vim, vim-plugin
- Language: Vim script
- Homepage:
- Size: 1.13 MB
- Stars: 38
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-print-debug
![](.github/demo.gif)
automatic "printf" style debugging for vim.
each new call returns a unique line with incrementing chars. eg "aaa", "bbb", "ccc".it also leaves the print statements in a format where it's easy to add some variable interpolation.
this plugin is only for extreme professionals 😎
## install
with your favourite plugin manager, `sentriz/vim-print-debug`.
or just copy the source into your vimrc.and add a mapping:
```vim
nnoremap p :call print_debug#print_debug()
```## settings
#### `g:print_debug_default`
- desc: template to use if no language was found
- default:
```vim
let g:print_debug_default = '"{}"'
```#### `g:print_debug_templates`
- desc: debug line templates for different filetypes. (see `:echo &filetype`)
- default:
```vim
let g:print_debug_templates = {
\ 'go': 'fmt.Printf("+++ {}\n")',
\ 'python': 'print(f"+++ {}")',
\ 'javascript': 'console.log(`+++ {}`);',
\ 'c': 'printf("+++ {}\n");',
\ }
```