Code Monkey home page Code Monkey logo

Comments (4)

AndrewRadev avatar AndrewRadev commented on May 30, 2024

That would be pretty useful. I'll see what I can do about it this weekend.

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 30, 2024

The latest version now supports multiline strings in coffee. I'll see about adding support in other filetypes further down the line.

from splitjoin.vim.

ichernev avatar ichernev commented on May 30, 2024

I'm not sure if it is working as expected.
If you have foo = "bar" and the cursor is in the beginning of the line, it doesn't split. The cursor should be inside the string for it to work.

from splitjoin.vim.

AndrewRadev avatar AndrewRadev commented on May 30, 2024

Yeah, that's intended. Consider this:

foo = "bar" if baz?

This could either split the if clause or the string. Of course, it makes sense to prioritize the if clause in this case, but how about this one:

foo = bar "baz", "qux"

Now there's two strings. Which one to split? The second one makes more sense, but it's getting a bit ambiguous here. I could add some additional logic to look for the construct "closest" to the cursor, but that's going to be complicated to implement. I'd rather have the rule "be inside the construct in order to split it".

Incidentally, the recently implemented ternary operator splitting may cause some problems in this regard, but I'll work on that some more.

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.