You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: New keymap/command configuration - closes#44
The mechanism for setting up keymappings or commands for debugprint.nvim
has changed to resolve some issues some users saw with custom mapping of
keys - see GitHub issue #44 for the history. If you didn't customize the
default keymappings or commands before, you shouldn't have to change
anything. However, if you did, you should switch to the new mechanism
instead. Please see [README
link](https://github.com/andrewferrier/debugprint.nvim/blob/main/README.md#keymappings-and-commands)
for an explanation of the new mechanism. Old keymapping configuration
should continue to work for now, although direct keymapping via
`vim.keymap.set()` is no longer officially supported and may be removed
in future, and you may see deprecation warnings.
| Normal |`g?p`| Insert plain debug line below current line |`require('debugprint').debugprint()`|
116
-
| Normal |`g?P`| Insert plain debug line above current line |`require('debugprint').debugprint({above = true})`|
117
-
| Normal |`g?v`| Insert variable debug line below current line. If cursor is on a variable, use it, otherwise prompt |`require('debugprint').debugprint({variable = true})`|
118
-
| Normal |`g?V`| Insert variable debug line above current line. If cursor is on a variable, use it, otherwise prompt |`require('debugprint').debugprint({above = true, variable = true})`|
119
-
| Normal | None | Prompt for variable name, insert variable debugging line below the current line |`require('debugprint').debugprint({ignore_treesitter = true, variable = true})`|
120
-
| Normal | None | Prompt for variable name, insert variable debugging line above the current line |`require('debugprint').debugprint({ignore_treesitter = true, above = true, variable = true})`|
121
-
| Visual |`g?v`| Insert visually-selected variable debugging line below the current line |`require('debugprint').debugprint({variable = true})`|
122
-
| Visual |`g?v`| Insert visually-selected variable debugging line below the current line |`require('debugprint').debugprint({variable = true})`|
123
-
| Op-pending |`g?o`| Locate variable using motion, and insert a variable debugging line below the current line |`require('debugprint').debugprint({motion = true})`|
124
-
| Op-pending |`g?O`| Locate variable using motion, and insert a variable debugging line above the current line |`require('debugprint').debugprint({motion = true, above = true})`|
125
-
| Command |`:DeleteDebugPrints`| Delete all debug lines added to this buffer |`require('debugprint').deleteprints()`|
126
-
127
-
### Custom Keymappings and Commands
128
-
129
-
The keymappings are chosen specifically because by default they are
130
-
used to convert sections to ROT-13, which most folks don't use. You can disable
131
-
the defaults above from being created by setting `create_keymaps` and/or
132
-
`create_commands`, and map them yourself to something else if you prefer:
0 commit comments