Code Monkey home page Code Monkey logo

brackets-indentator's People

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

Watchers

 avatar

brackets-indentator's Issues

No recognition for line breaks in HTML

Indentator seems to only parse for tags with "</" to change the indentation. Normally this would work, but it needs to be able to skip over the "
" tag that doesn't have a match that opens. This messes up the indentation for everything after the break.

Indentation fails for PHP + HTML

Same as #13 and #14.

When working on PHP files which mix HTML tags, the indentation fails.

Before:

<?php 
if (isset($error)) :
    echo '<p >', $error, '</p>';
endif;

?>

<div class="searchBlock">
          <form>
            <div class="input-group">
              <input placeholder="Key word" class="form-control"><span class="input-group-btn">
                <button type="submit" class="btn btn-default"><span class="sprite-digSearch"></span></button></span>
            </div>
          </form>
        </div>

After:

if (isset($error)) :
echo '<p >', $error, '</p>';
endif;

?>

<div class="searchBlock">
<form>
<div class="input-group">
<input placeholder="Key word" class="form-control"><span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="sprite-digSearch"></span></button></span>
</div>
</form>
</div>

TypeScript

The plugin doesn't behave well for TypeScript.

Try to ctrl+alt+i the following code and you will see the bad indentation:

    // Annotation section
    @Component({
      selector: 'my-app'
    })
    @View({
      template: '<h1>Hello {{ name }}</h1>'
    })
    // Component controller
    class MyAppComponent {
      name: string;
      constructor() {
        this.name = 'Alice';
      }
    }

Bad Indent of Multiple CSS Lines

When the program auto-indents css, if the line above has multiple lines when word wrap is turned on, the line indents fine. When I shrink the brackets window, it creates a line above with multiple spaces. I attached a screenshot of when Brackets is expanded completely and when it is shrunk. The issue only appears when the window is shrunken.

Hopefully I explained this so that it makes sense. If not, contact me and Ill attach more images.
Thanks

screen shot 2014-05-17 at 8 36 25 am 2

screen shot 2014-05-17 at 8 38 29 am 2

Indenting YAML file destroys the structure

I have the following YAML file (with unnecessary white spaces in the line between d: and e:):

a:
    b:
        c: 123
        d: 456

    e: "test"

When pressing Ctrl+Alt+I for indenting, I get the following result:

a:
b:
c: 123
d: 456

e: "test"

IMHO this is a different structure than the original one.

Plugin Version: 1.0.3

PHP indents to be aligned with PHP delimiters

Just a wishlist, not sure if it's a standard practice or not, but would it be possible to have the indentation of PHP codes aligned with the PHP delimiters?

Currently on indent document the result is like this:

<table>
    <tr>
        <td>
            <?php
if($test == 0){
    echo "TEST";
}
            ?>
        </td>
    </tr>
</table>

Whereas I would prefer it to be like this:

<table>
    <tr>
        <td>
            <?php
            if($test == 0){
                echo "TEST";
            }
            ?>
        </td>
    </tr>
</table>

Switch case indentation issue

Hi, with regards to this issue: codemirror/codemirror5#4707, which has been resolved upstream in latest version of CodeMirror, I was wondering when you plan to reintegrate it to brackets-indentator since switch block indentation is still broken. Looking at your code I assume you're simply delegating to method codeMirror.indentLine but perhaps an older version thereof? Cheers.

Indent don't work correctly with last version

Hi,
Indentation plugin has updated this morning, and strangely indentation in my files changed.

In my js files, my config has tab indentation with size 4.

Now, when I use indentation plugin, my first depth is indent with 2 spaces ...
next depth with 1 tab !
next, 1 tab and 2 spaces
next, 2 tabs
next, 2 tabs and 2 spaces,
etc ...

Thanks

brackets 0.38
indentation : 1.0.2

Indent part of a document

Is is possible to indent only part of a document, for example select the code you want to indent, then press ctrl + tab, or similar?

Markup to disable indent on part of a document

Hi,
First, thank you for your great plugin, I think that this is the first I install on every of my Brackets instances (8 or 9 for now, I guess haha).
I'm looking for a way to disable indent on certain parts of my documents, as my own indent rules may be quite unusual and are not supported by your plugin:

foo.bar === true ?
    var_a :
    (foo.bar ?
        var_b :
        var_c)

It is quite annoying to see this indent destroyed every time I reindent the doc. So, it would be great to have a markup, such as [[noindent]][[/noindent]] to put inside of comments to disable indent between them.

Thank you very much

Problem with jQuery syntax

Thanks for the good extension, I've found this problem:

$("<a/>")
.append("<span/>")
.find("span")
.remove()
.end()
.remove();

Should becomes:

$("<a/>")
    .append("<span/>")
    .find("span")
        .remove()
    .end()
    .remove();

And instead it's just left as it.

If the correct syntax is too difficult to implement please at least use this option:

$("<a/>")
    .append("<span/>")
    .find("span")
    .remove()
    .end()
    .remove();

Thanks.

Indenting documentation comment blocks

Love the plugin, thanks first and foremost. It's main weakness for me is it doesn't indent code blocks typically used for documentation purposes such as:

/**
*  A description for a method
*  @method someMethod    
*  @param    {String}    someParam
*  @return    {Object}
*/

Single line comments seem ok.

Indentatator does not indent lines with leading `.`

Expected:

promise
  .then(function (result) {
    // ...
  });

Current:

promise
.then(function (result) {
  // ...
});

Block that start with a leading . are generally indented. If you think this should not be turned on by default, I would ask that you add it as a preference.

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.