Coder Social home page Coder Social logo

join-lines-plugin's People

Contributors

allanderek avatar lisiadito avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

join-lines-plugin's Issues

Issue in the plugin name when installing

Hi !
Very cool this plugin, though there is an incoherence between the doc to install the plugin and the repo.json.
You state you have to have to write > plugin install join-lines in the README.MD
But
The name of the plugin in the repo.json file is joinLines
Actually I had to write > plugin install joinLines to install the plugin.

I can make a pull request if you want, but I don't know which of the README.MD or repo.json is correct.

Can you tell me what should be the name of the plugin ?

EDIT : Actually it would be easier to change the doc, because the name joinLines is used in the plugin channel

Removes indentation of the current line

If you use joinLines to join the current and the next line, it removes most of the indentation from the current line, which is probably not what you want, particularly when editing code.

So for example:

       x =
              y

becomes

 x = y

when you probably wanted

       x = y

This happens because line 38 reduces all whitespace to a single space character:

    local modifiedSelection = string.gsub(selection, "%s+", " ")

This also means that if you have deliberate whitespace within a line it gets squased eg.

x:          blah;
y:           foo
                 + bar; 

if joining the y: line to the one below you get:

x:          blah;
y: foo + bar;

Both issues can be solved by requiring the replaced whitespace to start with a new line:

    local modifiedSelection = string.gsub(selection, "\n%s+", " ")

Bug: joining results in deleted text

When I past the following into Sublime and go to the first line and hit alt-j twice, it joins the first two lines. Hitting alt-j a third time deletes the line I'm on and the next line, instead of joining them.

 The original Moore’s Law came out of an article I published in 1965 this was the
early days of the integrated circuit, we were just learning to put a few components on a chip. I was
given the chore of predicting what would happen in silicon components in the next 10 years for the
35th anniversary edition of “Electronic Magazine”

micro-join

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.