# VVDocumenter-Xcode [![Build Status](https://api.travis-ci.org/onevcat/VVDocumenter-Xcode.svg)](https://travis-ci.org/onevcat/VVDocumenter-Xcode) <a href="https://flattr.com/submit/auto?user_id=onevcat&url=https%3A%2F%2Fgithub.com%2Fonevcat%2FVVDocumenter-Xcode" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
---
## What is this?
Writing document is so important for developing, but it is really painful with Xcode. Think about how much time you are wasting in pressing '*' or '/', and typing the parameters again and again. Now, you can find the method (or any code) you want to document to, and type in `///`, the document will be generated for you and all params and return will be extracted into a Javadoc style, which is compatible with [appledoc](https://github.com/tomaz/appledoc), [Doxygen](http://www.stack.nl/~dimitri/doxygen/) and [HeaderDoc](https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html). You can just fill the inline placeholder tokens to finish your document.
Here is an image which can show what it exactly does.
![Screenshot](https://raw.github.com/onevcat/VVDocumenter-Xcode/master/ScreenShot.gif)
> By the way, it also supports [Swift](https://developer.apple.com/swift/) now. Cheers!
![Screenshot](https://raw.github.com/onevcat/VVDocumenter-Xcode/master/vvdocumenter-swift.gif)
## How to install and use?
The best way of installing is by [Alcatraz](http://alcatraz.io). Install Alcatraz followed by the instruction, restart your Xcode and press `⇧⌘9`. You can find `VVDocumenter-Xcode` in the list and click the icon on left to install.
If you do not like the Alcatraz way, you can also clone the repo. Then build the `VVDocumenter-Xcode` target in the Xcode project and the plug-in will automatically be installed in `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins`. Relaunch Xcode and type in `///` above any code you want to write a document to.
If you want to use other text beside of `///` to trigger the document insertion, you can find a setting panel by clicking `VVDocument` in the Window menu of Xcode. You can also find some other useful options there, including setting using spaces instead of tab in the panel or changing the format of generated documentation.
## Xcode version?
This plug-in is supported in Xcode 5 and 6 (current beta). From Xcode 5, Apple added a UUID-verification to all plugins to ensure the stability when Xcode gets updated. The value of `DVTPlugInCompatibilityUUIDs` in project plist should contains current UUID of Xcode version, or the plugin does not work. Once you update your Xcode, the plugin might be disabled and you should check the newest version and built it again.
The default deployment target is 10.8. If you want to use it in a earlier OS version, you should change OS X Deployment Target (in project info setting) to your system version.
## Swift Support
Yes, this plugin supports documentation for Swift now. Check [this post](http://nshipster.com/swift-documentation/) from @mattt to see how to write the documentation for swift. By using `VVDocumenter-Xcode`, you can just type `///` to make the magic happen.
## Limitations and Future
The plugin is using simulation of keyboard event to insert the doc comments for you. So it is depending the keyboard shortcut of Xcode. These two kinds of operation are being used:
* Delete to Beginning of the Line (⌘⌫)
* Paste (⌘V)
If you have modified these two shortcuts in your Xcode, the newset version of the plugin would not work correctly. Instead, you can use a earlier version such as [this one(commit 03c4169ff7)](https://github.com/onevcat/VVDocumenter-Xcode/tree/03c4169ff79b618b9fd3db93dd96652a522ad3e0). Be causion you may suffer an [undo and redo issue ](https://github.com/onevcat/VVDocumenter-Xcode/issues/3).
`VVDocumenter-Xcode` is now using regular expression to extract things needed, which is not the best way to do such thing. A better approach could be using the AST, and I also have a plan to do it later if I have some more time :)
## License
VVDocumenter is published under MIT License
Copyright (c) 2014 Wei Wang (@onevcat)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
VVDocumenter-Xcode-master.zip (70个子文件)
VVDocumenter-Xcode-master
ScreenShot.gif 454KB
.travis.yml 99B
vvdocumenter-swift.gif 536KB
VVDocumenterTests
CommenterTests
CommenterTests.m 3KB
en.lproj
InfoPlist.strings 45B
VVTestHelper.m 8KB
VVDocumenterTests-Prefix.pch 319B
VVTestHelper.h 414B
VVDocumenterTests.m 2KB
DocumenterTests
VVMethodTestsCode.plist 17KB
SyntaxTests
SyntaxTests.m 6KB
VVDocumenterTests-Info.plist 691B
README.md 5KB
VVDocumenter-Xcode.xcodeproj
xcshareddata
xcschemes
VVDocumenterTests.xcscheme 2KB
VVDocumenter-Xcode.xcscheme 2KB
project.xcworkspace
contents.xcworkspacedata 163B
xcuserdata
onevcat.xcuserdatad
WorkspaceSettings.xcsettings 333B
yangyan.xcuserdatad
UserInterfaceState.xcuserstate 10KB
xcuserdata
yangyan.xcuserdatad
xcschemes
xcschememanagement.plist 427B
project.pbxproj 43KB
.gitignore 4KB
VVDocumenter-Xcode
en.lproj
InfoPlist.strings 45B
VVDocumenter.m 3KB
KeyboardHelper
VVKeyboardEventSender.h 726B
VVKeyboardEventSender.m 2KB
OCCategory
NSString+PDRegex
NSString+PDRegex.h 1KB
NSString+PDRegex.m 4KB
NSTextView+VVTextGetter
NSTextView+VVTextGetter.m 1KB
NSTextView+VVTextGetter.h 595B
NSString+VVSyntax
NSString+VVSyntax.h 563B
NSString+VVSyntax.m 2KB
VVTextResult.h 389B
NSString+VVTextGetter
NSString+VVTextGetter.m 8KB
NSString+VVTextGetter.h 1KB
VVTextResult.m 560B
VVDocumenter.h 323B
VVDocumenterManager.h 236B
VVDocumenter-Xcode-Info.plist 1KB
VVDocumenterManager.m 10KB
VVDocumenter-Xcode-Prefix.pch 323B
Setting
VVDSettingPanelWindowController.xib 83KB
VVDocumenterSetting.h 1004B
VVDocumenterSetting.m 8KB
VVDSettingPanelWindowController.h 259B
VVDSettingPanelWindowController.m 9KB
Commenter
VVSwiftFunctionCommenter.m 3KB
VVArgument.m 2KB
VVBaseCommenter.h 875B
VVMethodCommenter.h 233B
VVEnumCommenter.m 3KB
VVStructCommenter.m 222B
VVVariableCommenter.m 228B
VVPropertyCommenter.h 237B
VVStructCommenter.h 233B
VVCommenter.h 584B
VVMacroCommenter.h 231B
VVPropertyCommenter.m 228B
VVSwiftFunctionCommenter.h 247B
VVSwiftPropertyCommenter.m 349B
VVFunctionCommenter.m 1KB
VVArgument.h 296B
VVVariableCommenter.h 237B
VVEnumCommenter.h 229B
VVMacroCommenter.m 642B
VVSwiftEnumCommenter.h 239B
VVSwiftPropertyCommenter.h 247B
VVBaseCommenter.m 8KB
VVMethodCommenter.m 1KB
VVFunctionCommenter.h 237B
VVSwiftEnumCommenter.m 1KB
共 70 条
- 1
资源评论
- xin121110003342015-09-30感觉超级好用,之前一直在找这个小插件,终于找到了,谢谢了
- qq_156222052015-06-30感觉用着还行
chernyog
- 粉丝: 56
- 资源: 28
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功