@@ -48,6 +48,7 @@ the NeoVim generation. It:
48
48
- Provides [ keymappings] ( #keymappings-and-commands ) for normal, insert,
49
49
visual, and operator-pending modes. Supports
50
50
[ dot-repeat] ( https://jovicailic.org/2018/03/vim-the-dot-command/ ) .
51
+ Can insert two 'surrounding' lines at the same time.
51
52
52
53
- Supports direct writing to NeoVim registers for batch insert of debugprint
53
54
lines.
@@ -103,29 +104,33 @@ the box'. There are also some function invocations which are not mapped to any
103
104
keymappings or commands by default, but could be. This is all shown in the
104
105
following table.
105
106
106
- | Mode | Default Key / Cmd | Purpose | Above/Below Line |
107
- | ---------- | --------------------------- | ------------------------------------------------------------------------------- | ---------------- |
108
- | Normal | ` g?p ` | Plain debug | Below |
109
- | Normal | ` g?P ` | Plain debug | Above |
110
- | Normal | ` g?v ` | Variable debug | Below |
111
- | Normal | ` g?V ` | Variable debug | Above |
112
- | Normal | None | Variable debug (always prompt for variable) | Below |
113
- | Normal | None | Variable debug (always prompt for variable) | Above |
114
- | Normal | None | Delete debug lines in buffer | - |
115
- | Normal | None | Comment/uncomment debug lines in buffer | - |
116
- | Insert | ` Ctrl-G p ` | Plain debug | In-place |
117
- | Insert | ` Ctrl-G v ` | Variable debug (always prompt for variable) | In-place |
118
- | Visual | ` g?v ` | Variable debug | Below |
119
- | Visual | ` g?V ` | Variable debug | Above |
120
- | Op-pending | ` g?o ` | Variable debug | Below |
121
- | Op-pending | ` g?O ` | Variable debug | Above |
122
- | Command | ` :DeleteDebugPrints ` | Delete debug lines in buffer | - |
123
- | Command | ` :ToggleCommentDebugPrints ` | Comment/uncomment debug lines in buffer | - |
124
- | Command | ` :ResetDebugPrintsCounter ` | Reset debug print persistent counter (only for built-in counter implementation) | - |
125
-
126
- Each of the keymappings (except for insert mode) can also be prefixed with a
127
- register, see the [ showcase] ( SHOWCASE.md#register-usage ) for an example of how
128
- to use this to insert debugprint lines in batches.
107
+ | Mode | Default Key / Cmd | Purpose | Above/Below Line |
108
+ | ---------- | --------------------------- | ------------------------------------------------------------------------------- | -------------------------- |
109
+ | Normal | ` g?p ` | Plain debug | Below |
110
+ | Normal | ` g?P ` | Plain debug | Above |
111
+ | Normal | ` g?v ` | Variable debug | Below |
112
+ | Normal | ` g?V ` | Variable debug | Above |
113
+ | Normal | None | Variable debug (always prompt for variable) | Below |
114
+ | Normal | None | Variable debug (always prompt for variable) | Above |
115
+ | Normal | ` g?sp ` | Plain debug | Above and below (surround) |
116
+ | Normal | ` g?sv ` | Variable debug | Above and below (surround) |
117
+ | Normal | None | Variable debug (always prompt for variable) | Above and below (surround) |
118
+ | Normal | None | Delete debug lines in buffer | - |
119
+ | Normal | None | Comment/uncomment debug lines in buffer | - |
120
+ | Insert | ` Ctrl-G p ` | Plain debug | In-place |
121
+ | Insert | ` Ctrl-G v ` | Variable debug (always prompt for variable) | In-place |
122
+ | Visual | ` g?v ` | Variable debug | Below |
123
+ | Visual | ` g?V ` | Variable debug | Above |
124
+ | Op-pending | ` g?o ` | Variable debug | Below |
125
+ | Op-pending | ` g?O ` | Variable debug | Above |
126
+ | Op-pending | ` g?so ` | Variable debug | Above and below (surround) |
127
+ | Command | ` :DeleteDebugPrints ` | Delete debug lines in buffer | - |
128
+ | Command | ` :ToggleCommentDebugPrints ` | Comment/uncomment debug lines in buffer | - |
129
+ | Command | ` :ResetDebugPrintsCounter ` | Reset debug print persistent counter (only for built-in counter implementation) | - |
130
+
131
+ Each of the keymappings (except for 'surround' keys and insert modes) can also
132
+ be prefixed with a register, see the [ showcase] ( SHOWCASE.md#register-usage ) for
133
+ an example of how to use this to insert debugprint lines in batches.
129
134
130
135
The keys and commands outlined above can be specifically overridden using the
131
136
` keymaps ` and ` commands ` objects inside the ` opts ` object used above during
@@ -144,8 +149,12 @@ return {
144
149
variable_above = " g?V" ,
145
150
variable_below_alwaysprompt = " " ,
146
151
variable_above_alwaysprompt = " " ,
152
+ surround_plain = " g?sp" ,
153
+ surround_variable = " g?sv" ,
154
+ surround_variable_alwaysprompt = " " ,
147
155
textobj_below = " g?o" ,
148
156
textobj_above = " g?O" ,
157
+ textobj_surround = " g?so" ,
149
158
toggle_comment_debug_prints = " " ,
150
159
delete_debug_prints = " " ,
151
160
},
@@ -223,6 +232,7 @@ they are used to convert sections to ROT-13, which most folks don't use.
223
232
| Persistent location counter between NeoVim sessions | :+1 : | :x : | :x : | :x : | :x : | :x : | :x : |
224
233
| Print plain debug lines | :+1 : | :+1 : (via user config) | :+1 : | :x : | :+1 : | :x : | :x : |
225
234
| Print variables using treesitter | :+1 : | :+1 : | :+1 : | :x : | :+1 : | :x : | :x : |
235
+ | 'Surround' lines with debugging above and below | :+1 : | :x : | :x : | :x : | :x : | :x : | :x : |
226
236
| Use treesitter to locate log targets | (some languages) | :+1 : | :+1 : | :x : | :x : | :x : | :x : |
227
237
| Use treesitter to intelligently insert log lines | :x : | :+1 : | :+1 : | :x : | :x : | :x : | :x : |
228
238
| Enter variables/expressions using prompts | :+1 : | :x : | :x : | :x : | :x : | :x : | :x : |
0 commit comments