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
v0.0.3: clipboard watcher replaces the Ctrl+C keybinding approach
The keybinding override on Ctrl+C wasn't firing reliably in real
sessions — VS Code's terminal keybinding resolution is finicky and the
'terminalTextSelected' context key doesn't always match when users
copy via right-click or mouse-select.
New approach: watch the clipboard. An interval tick (default 300 ms,
paused when the VS Code window is unfocused) reads the current
clipboard text and, if the content has newlines and looks wrapped,
cleans it and writes the cleaned version back. Works no matter how
the user copied (Ctrl+C, right-click, mouse-select-copy, any shell
shortcut) because it operates at the clipboard layer, not the
keybinding layer.
Also:
- Status bar now updates on each clipboard tick: 'watching',
'cleaned N clusters', 'no change (N lines)', etc.
- Settings: tidyPaste.watchClipboard (default true) and
tidyPaste.watchIntervalMs (default 300).
- Manual command 'tidy-paste.terminalCopyClean' still works for users
who want to trigger explicitly.
- Settings changes are picked up live without a reload.
Copy file name to clipboardExpand all lines: package.json
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"name": "tidy-paste",
3
3
"displayName": "Tidy Paste",
4
4
"description": "Cleans terminal-wrapped text on copy from VS Code's integrated terminal so pasted content arrives without stray line breaks or trailing whitespace.",
5
-
"version": "0.0.2",
5
+
"version": "0.0.3",
6
6
"publisher": "miller-joe",
7
7
"license": "MIT",
8
8
"repository": {
@@ -62,6 +62,16 @@
62
62
"default": true,
63
63
"description": "Master switch. When off, terminal copy behaves as default."
64
64
},
65
+
"tidyPaste.watchClipboard": {
66
+
"type": "boolean",
67
+
"default": true,
68
+
"description": "Watch the clipboard for changes and clean wrapped content automatically. Works regardless of how you copied (Ctrl+C, right-click, mouse-select). Turn off if you only want the manual command."
69
+
},
70
+
"tidyPaste.watchIntervalMs": {
71
+
"type": "number",
72
+
"default": 300,
73
+
"description": "How often to check the clipboard for changes, in milliseconds. Lower = more responsive but uses slightly more CPU."
0 commit comments