Skip to content
Snippets Groups Projects
Commit d4596144 authored by Campbell Barton's avatar Campbell Barton
Browse files

simple surround util script to add () around the selection

parent c57955e2
Branches
Tags
No related merge requests found
#!/usr/bin/env python3
import sys
# TODO, accept other characters as args
txt = sys.stdin.read()
print("(", end="")
print(txt, end="")
print(")", end="")
<?xml version="1.0" encoding="UTF-8"?>
<externaltool id="qtc_select_surround">
<description>Surround selection with parentheses or other optionally other characters.</description>
<displayname>Surround selection with parentheses</displayname>
<category>Formatting</category>
<executable output="replaceselection" error="showinpane" modifiesdocument="no">
<path>qtc_select_surround.py</path>
<input>%{CurrentDocument:Selection}</input>
<workingdirectory>%{CurrentDocument:Path}</workingdirectory>
</executable>
</externaltool>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment