Giter Club home page Giter Club logo

atom-transform's Introduction

transform [alpha, WIP]

Transform (selected) text in atom editor.

A collection of usefull text transformations.

The inspiration for this package comes comes from several TextMate packages. The small helpers like HTML > URI-Encode are the only thing I really miss, however I think these "transformations" of the current selection are better bundled together. For example, one might need to URI-encode a small snippet of text outside of a .html file.

Features

  • adds commands to apply [transformations][#transformations] to the selected text
  • works with multiple selections (like the built-in Edit > Text Commands)

Included Transformations

The following string methods from underscore.string are included as commands:

  • clean: (no more than 1 whitespace)
  • trim: (remove whitespace around)
  • swapCase: Lorem Ipsum => lOREM iPSUM
  • capitalize: lorem ipsum => Lorem ipsum
  • titleize: lorem ipsum => Lorem Ipsum
  • camelize: lorem ipsum factory_bean => loremIpsumFactoryBean
  • underscored: Lorem Ipsum => lorem_ipsum
  • dasherize: Lorem Ipsum => Lorem Ipsum
  • humanize: loremIpsum_FactoryBean => Lorem ipsum factory bean
  • classify: Lor.em Ip sum => LorEmIpSum
  • slugify: Lo!rem/ Ip = sum => lorem-ip-sum
  • stripTags: Lorem <br>Ipsum => Lorem Ipsum
  • escapeHTML: <b>Lorem Ipsum</b> => &lt;b&gt;Lorem Ipsum&lt;/b&gt;
  • unescapeHTML: &lt;b&gt;Lorem Ipsum&lt;/b&gt; => <b>Lorem Ipsum</b>

The following URI methods are also available (via URIjs):

  • encodeURI: !Lorem&Ipsum! => %21Lorem%26Ipsum%21
  • decodeURI: Lorem%20%26%20Ipsum%20%5E%5E => Lorem & Ipsum ^^

Some additional built-ins:

  • double: Lorem => LoremLorem

TODO

  • make sure that the replaced text is properly selected (not the old range)

Open Questions

I am currently thinking about these topics and would appreciate input from the community:

  • how to organize the different commands internally
  • how to organize different command (groups) wrt menus, etc?
    • group it all in Packages > Transform > โ€ฆ and let the user configure which further menus to add where?
  • does a base package extensible by plugins (ala autocomplete-plus) make sense?

Help out

Contributions are more than welcome.
You can also give input to the open questions.

atom-transform's People

Contributors

eins78 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.