https://github.com/naoty/ntysmarttextview
NSTextView with smart features
https://github.com/naoty/ntysmarttextview
Last synced: 17 days ago
JSON representation
NSTextView with smart features
- Host: GitHub
- URL: https://github.com/naoty/ntysmarttextview
- Owner: naoty
- License: mit
- Created: 2014-03-25T13:07:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-28T10:07:53.000Z (about 11 years ago)
- Last Synced: 2025-03-27T07:51:45.905Z (about 1 month ago)
- Language: Objective-C
- Size: 582 KB
- Stars: 29
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NTYSmartTextView
[](http://cocoadocs.org/docsets/NTYSmartTextView)
[](http://cocoadocs.org/docsets/NTYSmartTextView)
## Features
- Smart indent: Keep the width of indent when breaking line.
- Soft tab: Input spaces instead of tabs by entering TAB key.
- Auto pair completion: Automatically complete closing braces and quotes.## Installation
NTYSmartTextView is available through [CocoaPods](http://cocoapods.org), to install
it simply add the following line to your Podfile:```rb
platform :osx
pod "NTYSmartTextView"
```## Usage
At Xib, set the custom view of a text view to `NTYSmartTextView`. By default, above features is enabled. If you want to change th default configurations, change properties as follows.
### Smart indent
```objective-c
self.textView.smartIndentEnabled = NO;
```### Soft tab
```objective-c
self.textView.softTabEnabled = NO;// You also can change the width of soft tab from 4.
self.textView.tabWidth = 2;
```### Auto pair completion
```objective-c
self.textView.autoPairCompletionEnabled = NO;
```