devzw / nef-plugin

πŸ”Œ an Xcode extension to use nef features easily

Home Page:http://nef.bow-swift.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nef: an Xcode 11 plugin

nef Swift UI Swift 5.1 Xcode 11+ macOS 10.15+

 

This project provides an extension for Xcode to integrate some nef features directly in the IDE. Using the core of nef, you can export snippets from your code selection directly in Xcode.

Features

πŸ’‘ Exports a code selection to images for given Xcode Playgrounds.

πŸ’‘ Generates Markdown files from Xcode Playground.

πŸ’‘ Builds a Playground Book with external dependencies defined in a Swift Package.

 

πŸ“₯ Installation

You can install nef plugin from Mac App Store or download the last binary from the releases section.

To complete the installation, you should enable nef extension from System Preferences > Extensions > Xcode Source Editor

nef: enable Xcode extension

Usage

🌁 Export code selection to image

In Xcode you can find the nef plugin options in Editor.

If you want to export your current code selection into a snippet, you only need to select the action Editor > nef > Code selection β†’ Image

nef: action for exporting code selection to snippet

nef: action for exporting code selection to snippet

nef: action for exporting code selection to snippet

πŸ”§ Preferences

You can customize the output image using the preferences action Editor > nef > Preferences

nef: preferences Xcode extension

 

πŸ“ƒ Generates markdown file from Playground

Xcode Playgrounds let you write comments in markdown format using the symbols //: for single line comments, or /*: */ for multiline comments. Markup for playgrounds includes page level formatting for headings and other elements, formatting spans of characters, showing inline images, and several other features. You can read more in the Markup Formatting Reference.

You can create a markdown file from playground page with the nef action Editor > nef > Playground β†’ Markdown

 

πŸ“² Create a Playground Book from your Swift package

You can create a Playground compatible with you iPad from a Swift package. You only need to open the swift package in Xcode, and select the action Editor > nef > Swift Package β†’ Playground Book

It will ask you where to save the Playground Book, and it will start to build it.

nef: action for making a Playground Book

This feature needs to use SwiftPM tool. Consequently, it will need to disable the sandbox thus it is not allowed in the App Store; but if you want to enjoy this feature, you only need to install the .dmg you'll find in the releases section.

 

πŸ”¨ Xcode navigation keyboard shortcuts

To make you a more productive developer, you can associate a keyboard shortcut to each nef action. Open the shortcuts menu in Xcode > Preferences... > Key Bindings and set your command.

nef: set keyboard shortcut

βš–οΈ License

Copyright (C) 2019 The nef Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

πŸ”Œ an Xcode extension to use nef features easily

http://nef.bow-swift.io

License:Other


Languages

Language:Swift 100.0%