b3by / surround-with

Easily surround code selections with language constructs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

surround-with

Build Status Dependencies! Plugin installations! Package version! License!

Easily surround code selections with language constructs.

About

This package provides a simple utility function that can be used when coding: to surround a selection with a code construct (that is, a control loop or a conditional statement).

Basic

Usage

When there is an active selection in the current buffer, the package will provide a list of constructs that match the current buffer grammar. Once a construct is pick from the select view, the selection in the buffer will be surrounded with the construct, and the overall text will be properly indented.

There is no default binding for the package. The user can either call the package from the command palette as surround-with:surround, or a new entry can be placed in the keymap.cson file:

'atom-workspace atom-text-editor:not([mini])':
  'ctrl-alt-o': 'surround-with:surround'

Supported languages

  • C/C++
  • Java
  • JavaScript
  • CoffeeScript
  • C#
  • Go
  • Objective-C
  • Perl
  • PHP
  • Python
  • Ruby

🚨 Disclaimer 🚨

This package is available in the Atom package repository, still it is under heavy development, thus not recommended for production usage. Any help is heavily appreciated, as well as issues and suggestions!

About

Easily surround code selections with language constructs.

License:MIT License


Languages

Language:JavaScript 92.1%Language:CSS 7.9%