Browse Source

Add stdout to clipboard editor

Alois Mahdal 6 years ago
parent
commit
cb9343ba7c
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      dotfiles/bash/main.bashrc

+ 12
- 0
dotfiles/bash/main.bashrc View File

@@ -342,6 +342,18 @@ xvxx() {
342 342
     xop o | vipe | xop ii
343 343
 }
344 344
 
345
+vx() {
346
+    #
347
+    # Edit stdin and save it to primary clipboard
348
+    #
349
+    # Ideal for selecting snippets of output of arbitrary commands.
350
+    # select the text, open terminal, call `xvx`, edit the text, move
351
+    # back to the browser and paste it over the old (still selected) text.
352
+    # That's it, no need to make up and save temporary files.
353
+    #
354
+    vipe | xop i
355
+}
356
+
345 357
 xxvxx() {
346 358
     #
347 359
     # Edit text in C-C clipboard and save it back