public
Description: A lightweight snippet plugin for Xcode
Homepage: http://blog.skorpiostech.com/
Clone URL: git://github.com/rtmfd/sktcompletion.git
sktcompletion / README
100644 46 lines (26 sloc) 1.846 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## INTRODUCTION
 
This is SKTCompletion, a plugin for XCode 3.0 and above which provides fast and simple "snippet" style completion support for Xcode.
 
## INSTALLATION:
 
To install:
 
1) Build the plugin. 1.1) In order to build the plugin you will need to obtain TouchSQL (thanks Jon Wight!) from http://code.google.com/p/touchcode/. I just checked it out, and symlinked
the TouchSQL directory into the main directory. 2) Copy or link (if your debugging, linking is preferred) the plugin into the following folder: ~/Library/Application
Support/Developer/Shared/Xcode/Plug-ins/ 3) Add the following lines to the Xcode keybindings file (~/Library/KeyBindings/PBKeyBinding.dict):
 
{
    "\U001B" = "completionPluginExpandMacro:";
}
 
4) Restart Xcode.
 
You'll notice that there's a new menu item added to the end of the Edit menu called "Add Snippet…". This adds/updates a snippet to/in the database. Currently there's no GUI for
deleting snippets. Modify the plist at ~/Library/Application Support/SKTCompletetion/completion.plist to do that.
 
To add snippets, see the schema.sh file.
 
## GOALS:
 
Keep it _fast_, _simple_, and _lightweight_.
 
## SNIPPET SYNTAX:
 
Example:
 
textToBePasted <#tabstop1#> <#tabstop2#> <#%clipboard#>
 
Result:
 
The string would be inserted into the document and the selection would be placed on tabstop1. Pressing Ctrl-/ would move to the next tab stop. <#%clipboard#> is replaced by the current
string on the pasteboard.
 
## COMPATIBILITY
 
The completion plist strives to be compatible with ODB Completion Dictionary's. While compatibility is not 100% (yet), it does work with <#%clipboard#> and <#simple#> placeholders. YMMV.
Please fix and submit patches for any bugs you trip across.
 
Just replace the file at ~/Library/Application Support/SKTCompletion/completion.plist with your ODB Completion Dictionary plist.