public
Description: A lightweight snippet plugin for Xcode
Homepage: http://blog.skorpiostech.com/
Clone URL: git://github.com/rtmfd/sktcompletion.git
Search Repo:
name age message
folder .gitignore Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder COPYING Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder Database/ Sat Apr 19 11:40:44 -0700 2008 Using a plist now instead of sqlite. [Ian Baird]
folder English.lproj/ Sat Apr 19 09:52:00 -0700 2008 Added pasteboard value interpolation support. [Ian Baird]
folder Info.plist Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder NSTextView+SKTCompletionExtensions.h Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder NSTextView+SKTCompletionExtensions.m Sat Apr 19 09:52:00 -0700 2008 Added pasteboard value interpolation support. [Ian Baird]
folder README Sat Apr 19 11:56:08 -0700 2008 Updated clipboard interpolation placeholder. [Ian Baird]
folder SKTAddSnippetController.h Sat Apr 19 09:52:00 -0700 2008 Added pasteboard value interpolation support. [Ian Baird]
folder SKTAddSnippetController.m Sat Apr 19 09:52:00 -0700 2008 Added pasteboard value interpolation support. [Ian Baird]
folder SKTCompletion.xcodeproj/ Sat Apr 19 11:40:44 -0700 2008 Using a plist now instead of sqlite. [Ian Baird]
folder SKTCompletionPlugin.h Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder SKTCompletionPlugin.m Sat Apr 19 09:52:00 -0700 2008 Added pasteboard value interpolation support. [Ian Baird]
folder SKTCompletion_Prefix.pch Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder SKTTextCompletor.h Sat Apr 19 11:40:44 -0700 2008 Using a plist now instead of sqlite. [Ian Baird]
folder SKTTextCompletor.m Sat Apr 19 11:56:08 -0700 2008 Updated clipboard interpolation placeholder. [Ian Baird]
folder TODO Sat Apr 19 09:56:57 -0700 2008 Updated docco. [Ian Baird]
folder Xcode plugin.pbfilespec Fri Apr 18 21:18:50 -0700 2008 Added a README and a LICENSE. [Ian Baird]
folder completion.plist Sat Apr 19 11:40:44 -0700 2008 Using a plist now instead of sqlite. [Ian Baird]
README
## 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.