Code Monkey home page Code Monkey logo

Comments (8)

AndrewRadev avatar AndrewRadev commented on May 29, 2024

Yes, I've thought about it, since it should be pretty useful, I simply never got around to doing it. I just pushed CSS support to master, you can try it out now, if you'd like.

Any feedback is welcome, so if you find any issues with it, let me know :).

from splitjoin.vim.

Devric avatar Devric commented on May 29, 2024

Mate!!!! Really really really awesome!!!!!!!!!!!!!
it runs almost flawlessly, but there is some multi-lined styles that doesn't work, the cursor have to be in the last line where the "{" is in order for it to work. But that is not a big deal.

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 29, 2024

I'm glad you like it :).

As for the multi-line problem, if you give me an example, I might be able to fix it. It's possible that I just missed some edge case.

from splitjoin.vim.

Devric avatar Devric commented on May 29, 2024

not a big deal though, but if you keen to look into it, here is an example
h1,
h2,
h3 {
blah blah
}

the cursor must be placed on h3 (in the same line as the "{" in order for it to collapse. But it only joints to the h3 { bla bla }, not joining the h1, h2,

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 29, 2024

Hm, I hadn't though of that use case. I'll think about it and see what I can do. If I manage to get it working, I'll write here.

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 29, 2024

Well, I played around with it some more and I got it working (pushed to master), although it's a separate join. The example goes like this:

h1,
h2,
h3 {
  font-size: 18px;
  font-weight: bold;
}

Now, if the cursor is on "h1" and you execute a join, the result will be this:

h1, h2, h3 {
  font-size: 18px;
  font-weight: bold;
}

On the other hand, if the cursor is on "h3", it'll turn out like this:

h1,
h2,
h3 { font-size: 18px; font-weight: bold; }

You can do both to join it completely if you like. There might be a bit of a problem in the fact that you can now join within the block as well and the results might not be very good. I'll think more about how I can avoid this later on.

from splitjoin.vim.

Devric avatar Devric commented on May 29, 2024

coolio, but as i said early on, it ain't a big deal, you probably should spend time on something else better than making this perfect lol

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 29, 2024

Don't worry about it, it's actually one of the simplest parts of the plugin :).

from splitjoin.vim.

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.