autosnippet v1.1.12
AutoSnippet
A iOS module management tool. Use the command line to create an Xcode Snippet, generate a JSON file, and share it with other developers in the code repository.
Installation
$ npm install -g autosnippetOptions
Please use all the following commands in the current Xcode project file directory.
init
Execute this command in the root directory of the Xcode project to create a workspace:
$ asd initWhen creating a workspace, the Snippet configuration information of the sub-workspace will be collected to the current workspace.
create
Command to create an Xcode Snippet, in the file directory marked with // ACode code:
$ asd cCode like this:
// ACode
UIView *view = [[UIView alloc] init];
// ACodeinstall
Add the shared Snippet to the Xcode environment:
$ asd iUse code Snippet like this:
// view is code key entered when creating
@view share
Share local Snippet:
$ asd swatch
In modular projects, recognize that Snippet automatically injects dependency header files:
$ asd wAppend header file
After the watch is turned on, if you want to append the header file, perform the following operations:
- Down arrow to select the headerVersion of Snippet
- Press the
Enter Command + Ssave file
Within 1 second, the header file is automatically added to the file header.
Browser view
After the watch is turned on, if you want to view more information about the module in the browser, perform the following operations:
- Enter
@andmodule key - Enter
#andALink Command + Ssave file
Automatically jump to the browser to open the link configured during creation, and open the README.md file without a link.
Use ALink like this:
@view#ALinkOther
Shortcuts for placeholders
You can add a placeholder in your snippets too using following tag:
<#placeholder#>E.g: the above placeholder can be written as:
<#view: UIView#>Xcode detects <# and #> tokens and will make the text between them a placeholder. We can switch between multiple placeholders by pressing Tab key.
When there are multiple same placeholders, use ⌥⌘E to select multiple placeholders continuously:
- Select a placeholder
⌥⌘Eselects the next placeholder,⌥⇧⌘Eselects the previous placeholder- Enter the modified content, all selected placeholders will be modified
Thanks.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago