Coder Social home page Coder Social logo

bracketstoix's Introduction

Logo

Brackets Utility Belt

Strap on the belt and become a Ninja Developer with these utilities.

This extension is also available for Visual Studio Code (vsctoix) and
Atom Editor(atomtoix).

If you find this extension useful, please, add a github star to show your support.

Interface

BracketstoIX adds a top-menu called IX.  
To prevent from cluttering the menu with all the commands, only a few commands were added to the menu.
Use Command mapper to add which ones you prefer, and setup the shortcuts.
No default shortcuts were define to prevent collision with other plugins.

Utilities

Case Change

Selection Policy is word.

Utility Example
UpperCase before:classNameFunc
after:CLASSNAMEFUNC
LowerCase before:classNameFunc
after:classnamefunc
Capitalize before:classNameFunc
after:ClassNameFunc
Camel Case before:ClassNameFunc
after:classNameFunc
Dash Case before:ClassNameFunc
after:class-name-func
Cycle Case before: _ClassNameFunc
after: _classNameFunc -> _CLASS_NAME_FUNC -> _class_name_func -> _class-name-func -> _class name func ->_ClassNameFunc
Add Space before Uppercase
Useful to transform functions names into documentation
before:doActionBefore
after:do Action Before

Encoders/Decoders

Selection Policy is line.

Utility Example
Html Encode before:<h1>Title</h1>
after:&lt;h1&gt;Title&lt;/h1&gt
Html Decode before:&lt;h1&gt;Title&lt;/h1&gt
after:<h1>Title</h1>
Url Encode before:https://github.com
after:https%3A%2F%2Fgithub.com
Url Decode before:https%3A%2F%2Fgithub.com
after:https://github.com

Quote Change

Selection Policy is line.

Utility Example
Single To Double Quote before:find'again
after:find"again
Double To Single Quote before:find"again
after:find'again
Toggle Quote before:find"again'
after:find'again"

Slash Change

Selection Policy is line.

Utility Example
Unix To Win Slash
Converts slashes to backslashes
before:chocolate/candy
after:chocolate\candy
Win To Unix Slash
Converts backslashes to slashes
before:chocolate\candy
after:chocolate/candy
Single To Double Slash before:find\nagain
after:find\\\nagain
Double To Single Slash before:find\\\nagain
after:find\nagain

Spacing

Selection Policy is all.

Utility Example
Tab To Space
Space to Tab only works with leading spaces
Space To Tab
Space to Tab only works with leading spaces

Line Commands

Selection Policy is all.

Utility Example
Join Lines
Joins lines adding the computed expression at the end of every line
before:
red
green

after:
expr:(x\c{X0A}),
red(x0A),green(x0B)
Split Lines
Split lines by an expression. Dynamic values aren't supported
before:
red,green

after:
expr: = \c{1}
red = 1
green = 2
Indent One Space
Adds one space to the beginning of each line
Outdent One Space
Removes one space to the beginning of each line
Remove Duplicated Lines
Removes consecutive duplicated lines
Only works with already sorted lines
before:
first
second
second

after:

first
second
Remove Empty Lines before:
first

second

after:

first
second
Number
It adds a number prefix to every selected line
Trim Leading
Trim Trailing
Sort Ascending
Sort Descending
Markdown Trim Trailing
Trims trailing spaces and adds 2 trailing spaces
Break line at
Breaks lines to have a maximum of N chars, with word break option

More Text Transformations

The list of commands are:
2. rgb-hex[sentence] - Converts from #HHHHHH to rgb(dec, dec, dec) and vice-versa. It supports multiple conversions
3. tag[sentence] - Uses the 1st word of the selected text as html tag, and surrounds the remaining the text with nearest text.
The most common tags have shortcuts: bu=button d=div sp=span te=textarea in=input

Ex: d -> <div></div>       h3#hello.active.other text -> <h3 id="hello" class="active other">text</h3>  
  1. untag[function] - Removes the nearest tag
  2. Reverse[function] - Reverses the terms in a assignment or comparison.
  3. Declare JSLint Global[word] - Adds the selected id to the /*global ... */ list

Selection Policy

Most of the commands operate on selected text.
If no text is selected, a command will use:
word - The nearest word (before and after the cursor)
sentence - The nearest text until a whitespace or newline
line - The text line where the cursor is located.
all - All the editor text
function - A function determines the text to use. Ex: Quote functions will use all the text between quotes that surrounds the cursor.

Dialogs

Input fields on the dialogs support history (CTRL+UP/DOWN).

Clipboard Commands

Copy Filename, Copy Fullname - Copies the filename of the active file to the clipboard
Regnize[sentence] - Copies to clipboard the text with all the regular expression special characters slashed.
This command simplifies the usage of on find/replace dialogs.
ExtractortoIX[all] - Copies to clipboard all the text matches. One per line.

ReplacetoIX Command

This command provides a replace dialog with the following options:

  • Ignore Case
  • Word Only
  • Replace All
  • Only Selection
  • Multiline
  • Start Value (use for numbering)
  • Step Value (use for numbering)

Just like all the other commands, it only operates on the selected text(only selection mode), if no text is selected it uses all the text.

Html Report Command

This command will copy to the clipboard a list of all the id's, classes and stylesheets used on the current html file [all].

Internet Search Commands

Open Url[sentence], Web Search[word] will open an external web browser with selected text either an url(Open Url) or text(Web Search)

Function JSDoc Command

This command will create a JSDoc function skeleton of the function where the cursor is located.
Ex:

function foo(param1, param2) { }  

Will become:

/**  
* foo  
* @param {} param1  
* @param {} param2  
* @return {}  
*/  
function foo(param1, param2) { }  

Also supports privates methods:

function _foo() { }  

Will become:

/**  
* @private  
* _foo  
* @return {}  
*/  
function _foo() { }  

Recent Files Command

Displays of the all recent opened files. This list is independent of the project.

Compiler

Compiler command with execute an external compiler. Supported file formats:

  • .js6 Compiles a ECMAScript 6 into a .js file using traceur compiler.  
  • .scss Compiles a .scss into a .css file using sass compiler.  
  • .js Minifies a .js file into a .min.js file using minifier  

To prevent from creating an oversize plug-in, the compilers must be installed manually:

  • To install sass compiler, follow the instructions on this link: sass compiler
  • To install traceur, first install nodejs, and then from the shell, execute npm install -g traceur  
  • To install traceur, first install nodejs, and then from the shell, execute npm install -g uglify-js  

By default, the compile on save is not active. You can use the Options to activate it

Lorem Ipsum

Inserts the classical lorem ipsum with options on the number of paragraphs, wrap, and max characters per line.

Dialog Commands

  • Commands - Displays a dialog box with the list of the commands to be executed.
    Use {{in}}, {{inpath}}, {{infile}}, {{out}}, {{outpath}}, {{outfile}} macros

  • Commands Mapper - Allows you to define which commands are on the menu, and its associate shortcuts.

  • Options - Configuration dialog

Roadmap

These are the plans for the next versions:

  • Default shortcuts
  • Go back to the previous edit cursor positions
  • Display the compilation error on a bottom panel
  • File Extension mapper. Ex: inc->php
  • Code snippets
  • Run grunt
  • Run node scripts
  • Run python scripts
  • Clean up the code
  • Improve the User Interface
  • Improve the code documentation

Feedback

This extension was created and tested on Windows 10, Mac OS, Linux Mint,
feedback of bugs on this and other platforms are welcome
but don't forget the golden rule: Be Polite!

Copyrights

© 2016-2019 Alexandre Bento Freire

License

MIT License+uuid License

bracketstoix's People

Contributors

a-bentofreire avatar apptoix avatar k5e avatar kant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bracketstoix's Issues

Compiling plain SCSS

I have a main.scss file consisting basically of imports:

@import 'layout/about';
@import 'layout/footer';
// etc.

When I change layout/_about.scss, this file is compiled to layout/_about.css, although we need to compile main.scss

A workraround would be to change the sass command to something like

sass --sourcemap {{projectdir}}/main.scss {{projectdir}}/main.css

But I can't find any information about such a macro.

TypoScript *.txt file: UPPERCASE on save

I'm having this issue which might be introduced with the latest update (V2.11.0).

I'm having a TXT-File with a TypoScript content. This is a case sensitive format.
When I save that document brackets converted the document in all UPPERCASE.

After I uninstalled BracketstoIX that behavior was gone.
After I reinstalled BracketstoIX that behavior was reintroduced.

Brackets Version
Release 1.1 Build 1.1.0-15558 (release ea908cae5)

Other Brackets extensions I have installed

  • Command Line Shortcuts 0.2.1
  • recognizer 0.0.9
  • Autoprefixer 0.5.20
  • Beautify 1.1.6
  • Brackets Compare 0.0.1
  • Brackets Git 0.14.14
  • Brackets Icons 1.3.0
  • Brackets Working File Tabs 1.0.3
  • brackets-add-comment 0.1.2
  • Code Folding 0.3.1
  • Column Ruler 2.3.6
  • Emmet 1.2.0
  • Extract for Brackets (Preview) 0.6.1-1719-release
  • File System Properties 1.0.1
  • FunctionFinder 1.0.0
  • HTML Block Selector 1.0.1
  • Inline Regex Editor 1.1.3
  • Integrated Development 0.5.59
  • JSCS 0.2.0
  • JSDownloader 3.1.0
  • JSHint 2.2.10
  • Markdown Preview 1.0.10
  • More CSS Code Hints 1.0.2
  • Node.js bindings 1.4.0
  • PHP Syntax Hint 1.1.3
  • PHPLint for Brackets 1.0.2
  • QuickDocsPHP 1.4.7
  • Rename JavaScript Identifier 0.2.8
  • Resizable Bottom Working Files 1.0.1
  • Theseus for Brackets 0.4.19
  • Toolbar Toggle 1.0.0
  • W3CValidation 2.1.6
  • WD Minimap 2.2.3
  • Whitespace Normalizer 0.3.0
  • WordHint 1.0.2

IX TT menu is broken on Ubuntu 14.04.1 LTS/Brackets 1.0.0-15191

The IX TT menu is only a narrow white bar without any content.
ixwtf
I have (several times) uninstalled the extension and removed all remainders from brackets.json.
It did not change this. On another PC with Windows 7 all is OK.

What is wrong here? Where should I have a deeper look?

Toggle single / double quotes, etc

As there is a lot of overlap between this extension and mikechambers's StringConvert one, can you please add these features (which AFAIK are the only ones missing):

  • Toggle quotes (single to double, double to single)
  • Convert single quotes to double quotes
  • Convert double quotes to single quotes

For reference, this is the other extension (not updated in almost a year):
https://github.com/mikechambers/StringConvert

I hope you can add these features to your extension. Thank you very much.

Sort Ascending for SASS

I would like to sort SASS rules ascending/descending. Currently I am working with a CSSComb extension. This is now the only feature that missing from bracketstoix.

So how about it? Is this something that could implemented in bracketstoix?

Thanks!!

How to turn off the compiler?

After trying the compiler of BracketstoIX I use now the
cmdline in the terminal: sass --watch sass:css and it works fine.

Now I want to deactivate the compiler of Brackets, but I cannot. Also if I deactivate BracketstoIX it still compiles the sass files into css files.
How to turn off the compiler?

My system information:
OS name: Apple Mac
OS version: OS X El Capitan
Sass version: 1.10.2 compiled with dart2js 2.0.0-dev.69.5

I'm new to github, hopefully here is the right place to post this question...
Thanks in an advance for an answer.

Black Horizontal Patch

Dear Sir,

I would like to inform you that the extension is loading up with a black horizontal patch, as you can see in the image I have attached with this message (I am using windows 10).

black-patch

It would be nice to hear back from you with a solution.

I look forward for your responds.

Kindest Regards,
Jay

"Show on CtxMenu" stays checked after uncheck in Commands Mapper dialog.

"brackets.json"

"bracketstoix.prefs": {
    "commands": {
        "value": {
            "showinmenu": [
                "reverse",
                "extractortoix",
                "replacetoix",
                "compiler",
                "commands",
                "commandsmapper",
                "options",
                "help",
                "about"
            ],
            "showinctxmenu": [
                "uppercase",
                "lowercase",
                "htmlencode",
                "htmldecode",
                "tabtospace",
                "openurl",
                "websearch",
                "htmlencode",
                "htmldecode",
                "tabtospace",
                "openurl",
                "websearch"
            ],
            "hotkeys": {}
        }

ReplaceIX give error "Step cant be empty"

Im trying out this addon on OSX and when i try the replace function on a selected piece of text, i get an error about Step field cant be empty. When i hover over it, it states something about ctr up / down. I dont understand this error than looking at that hover info

screen shot 2018-07-25 at 14 20 55

Compiling .scss

Hello. I installed sass via terminal, and confirmed it is correctly installed. However, nothing happens when I click to compile my .scss file using this extension. I checked the IX options for the compiler and it is set to: sass --sourcemap "{{in}}" "{{out}}"

I have tried removing "--sourcemap" as when I use that in terminal it says it's no longer needed, but that didn't change anything. I have checked 'compile on save' and have clicked the manual Compile option from the IX menu, but no luck. Do I need to have something else installed for this to work?

I am using the most recent versions of Brackets, IX and Saas.

Thanks for your help!

Compass Partials compile

Hello , I can't understand how works options of this extension. So , i want to compile just one .scss file, my structure of folders like so :
SCSS folder > below is the name of my folders with sass partials
/partials
/utils
/stylesheets
main.scss >
@import "compass";
@import "vendor/normalize";
and etc...
Can you help me ?
P.S thank you for your good extension, it's really nice!
Sorry, if my english look some bad, my native language is Russian.

Failed to load

i tried installing by both searching in brackets and installing from zip and i get an error on both saying it encounter an issue when trying to open it

Using multiple classes for tag shortcut

Currently only one class can be processed.
d#myId.foo -› <div id="myId" class="foo"></div>

Approach for passing multiple classes
d#myId.foo.bar -› <div id="myId" class="foo bar"></div>

JSDoc: reconizing other function patterns

It would be nice if the JSDoc Command could reconize also these functions:
var Car = {
_color: 'red',
color: function(value) {
this._color = value;
}
};

var Dog = function(value) {
this.name = value;
}

Dog.prototype.Bark = function() {
alert(this.name + " bark");
};

Add URLDecode

This extension seems to have both HTML-Encode and -Decode, but only has URL-Encode without URL-Decode. This is odd to not have the compliment for all of these related functions.

Request to add the URLDecode function.

Compiling SCSS, Options: sass --source-map "{{in}}" "{{out}}"

Great PlugIn, compiling SCSS on save works great, but it should read in
Options | Compilers | SCSS:
sass --source-map "{{in}}" "{{out}}"
(Note the hyphen between source and map) (Alternative: completely without --source-map)

System: Windows 10, 64bit
Sass: dart-sass-1.13.0-windows-x64.zip, unzipped and added to System-Path
Brackets: Release 1.13 Build 1.13.0-17696

BracketstoIX Installation failing from Brackets Extension Manager (Mac)

Hello,
On Brackets for Mac, the BracketstoIX installation fails from the Brackets Extension Manager. Downloading the .zip and manually installing in the Brackets Extensions window did not work either. See screenshot below.

The extension used to work perfectly on the same MacOS (High Sierra) until Brackets was upgraded.

OS: MacOS High Sierra (10.13.1)
Brackets Version: Release 1.13 build 1.13.0-17696 (release 49d29a8bc)
BracketstoIX Version: 3.6.0

PS: This extension is really great . Nice work.

image

[REQ]Find replace with use of regular expression

I would like to know if its possible to add Regular Expression functionality to ReplaceIX. I already saw a checkbox Regular Expression, but i guess that is for checking those as well.

Is there perhaps already a feature i didnt see.

Changing scss compile location

I was trying to change where the SASS is compiled. I thought perhaps I could in the options and changed the line to

sass --sourcemap "{{in}}" ".../css/{{out}}"

But it still saves in exactly the same place. What am I doing wrong? I want it to save to a css folder in the root of the project.

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.