JSPower is an Xcode extension that provides a development interface for the JavaScript language. Anyone can create Xcode extension utilities using JavaScript.
Powerful tools to enhance your Xcode development workflow
Convert selected text into ASCII Text format with a single click.
Convert selected text into ASCII Text.
Sort selected lines alphabetically or numerically.
Sort your code or text lines with ease.
Quickly add or remove block comments from your code.
/* Comment blocks of code */
Navigate through your code more efficiently.
Move lines up or down quickly.
After installing JSPower from the Mac App Store, follow these steps to enable it in Xcode:
!If you don't see JSPower in the Extensions list, try restarting your Mac and opening Xcode again.
JSPower's builtin utilities are implemented in JavaScript language, for examples,ASCII Text andSort lines. Source code of them is Here.
This is called a package.
manifest.json
contains all required information for the package:
packages/helloworld
directory.manifest.json
inpackages/helloworld
directory, and create directory for each menu item withmenu id
.{
"name":"Hello world",
"version":"1.0",
"author":"Your Name",
"website":"https://yourwebsite.com",
"description":"Your awesome package description",
"menu":[
{
"id":"hello",
"title":"Say Hello",
"shortcut":"cmd+shift+h"
}
]
}
entry.js
describes all the JavaScript files and the run order the menu includes.dot
for supply 2 or more menu items in one menu directory. e.g. See the Jump Menu IdThe builtin
and DLC Pack 1
is opensource under Here
There are two global variable now, invocation
and system
.
invocation.contentUTI
- The Unique Type Identifier (UTI) of the content in the buffer.invocation.tabWidth
- The number of space characters represented by a tab character in the buffer.invocation.indentationWidth
- The number of space characters used for indentation of the text in the buffer.invocation.usesTabsForIndentation
- A Boolean value that indicates whether tabs are used for indentation.invocation.selectionExist
- Whether there is selection of text.invocation.selections
- Array of arrays of integers representing selection ranges.invocation.firstSelection
- Array of integers representing the first selection range.invocation.selectionStrings
- Array of strings representing selected text.invocation.selectionLines
- Array of strings representing selected lines.invocation.completeBuffer
- All the content of current file.invocation.lines
- Array of strings representing all lines in the file.invocation.lineCount
- Line count of current file.invocation.insertLinesAtIndex(ArrayOfString,Integer)
- Insert lines at specified line index.invocation.appendLines(ArrayOfString)
- Append lines to the end of current file.invocation.removeLinesFromTo(Integer,Integer)
- Remove lines from line index to line index.invocation.assignLineAtIndex(String,Integer)
- Assign string to line at index.system.log(String)
- Log string using NSLog.system.openURL(String)
- Open URL.Discover and install community-created packages to extend JSPower's functionality.
Name | Author | URL | Description |
---|---|---|---|
JSPower Extend | everettjf | View Package | Block comment, Jump Up/Down lines |
Feel free to share your awesome packages with us! Send your package information to: