소스 검색

Add stdout to clipboard editor

Alois Mahdal 6 년 전
부모
커밋
cb9343ba7c
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12
    0
      dotfiles/bash/main.bashrc

+ 12
- 0
dotfiles/bash/main.bashrc 파일 보기

@@ -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