Giter VIP home page Giter VIP logo

Comments (4)

joshpeng avatar joshpeng commented on August 22, 2024

@hirosuke999 Hm. I'm not quite sure which scenario you mean.

Using this code snippet from the React docs discussing JSX tags...

import React from 'react';
import CustomButton from './CustomButton';

function WarningButton() {
  // return React.createElement(CustomButton, {color: 'red'}, null);
  <CustomButton color="red" />;
}

When I press enter inside the <CustomButton> tag I do get the new line auto indented in both Sublime and VS Code. Can you please provide an example of what you mean? Thanks.

from sublime-babel-vscode.

hirosuke999 avatar hirosuke999 commented on August 22, 2024

@joshpeng Thanks for your quick reply and sorry for my obscure explanation.

I mean HTML tag in js or jsx files, like <div></div> or <ul></ul>

I provided an example. Please check these followings. Thanks.

/*------------------------------------------
 * Case of Sublime's babel plugin.
/*------------------------------------------*/

// before press enter.
const Product = React.createClass({
  render: function () {
    return (
      <div>{**the cousor is located here**}</div>
    );
  }
}

// After press enter.
const Product = React.createClass({
  render: function () {
    return (
      <div>
        {**the cousor will be located here**}
      </div>
    );
  }
}
/*------------------------------------------
 * Case of this plugin.
/*------------------------------------------*/

// before press enter.
const Product = React.createClass({
  render: function () {
    return (
      <div>{**the cousor is located here**}</div>
    );
  }
}

// After press enter.
const Product = React.createClass({
  render: function () {
    return (
      <div>
      {**the cousor will be located here**}</div>
    );
  }
}

from sublime-babel-vscode.

joshpeng avatar joshpeng commented on August 22, 2024

@hirosuke999 Hmmm. I can't seem to reproduce this. Maybe it has to do with some of your other VS Code settings?

Please see this video: https://zippy.gfycat.com/IllfatedAstonishingIndiancow.webm
Sublime is on the left, VS Code is on the right

from sublime-babel-vscode.

hirosuke999 avatar hirosuke999 commented on August 22, 2024

@joshpeng Thanks for providing the video. So I see. Seems you're right.

OK. I'm going to check other VS code settings.

Thank you for your kind correspondence.

from sublime-babel-vscode.

Related Issues (20)

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.