Expand `dbg` to the correct debugger statement for the current file.
VimL
Latest commit cc6f199 Jun 13, 2014 @losingkeys Add html support
Generally the embedded script will be javascript in html, so use the
'deubgger' statement from there.
Permalink
Failed to load latest commit information.
doc initial commit Sep 3, 2013
plugin Add html support Jun 13, 2014
.gitignore initial commit Sep 3, 2013
CONTRIBUTING.org initial commit Sep 3, 2013
README.org Clarify copyright/license Sep 4, 2013

README.org

Stop Sign

Expand `dbg` to a line of debugging code that stops your program.

Why?

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.

Changing what `dbg` is replaced with

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:

  1. You don’t need to specify filetypes you’re not changing (this is merged with the defaults, it doesn’t overwrite them)
  2. 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).

Don’t like `dbg`?

If you want to abbreviate something other than `dbg`, simply set:

let g:stopsign_trigger = 'stop'

Thanks

Working on the execellent vim-niji and working with vim-endwise has helped me learn more vim script. Thanks to both of those authors.

License

Copyright © Joshua Hoff. Same license as vim itself. See: http://vimdoc.sourceforge.net/htmldoc/uganda.html#license Or `:help license` from within vim.