Expand `dbg` to a line of debugging code that stops your program.
A lot of people develop muscle memory with vim, so having a standard abbreviation that’s not specific to any filetype allows you to use that abbreviation all the time without thinking about it.
You can add support for a new filetype (or override the default for a supported filetype) with the following code:
let g:stopsign_replacements = {
\ 'javascript': 'debugger;'
\ }
A few notes about this:
- You don’t need to specify filetypes you’re not changing (this is merged with the defaults, it doesn’t overwrite them)
- If you think this abbreviation might be useful to others, check if it’s already supported, and make a pull request! (see CONTRIBUTING for more info).
If you want to abbreviate something other than `dbg`, simply set:
let g:stopsign_trigger = 'stop'
Working on the execellent vim-niji and working with vim-endwise has helped me learn more vim script. Thanks to both of those authors.
Same as vim itself. See: http://vimdoc.sourceforge.net/htmldoc/uganda.html#license Or `:help license` from within vim.