GithubHelp home page GithubHelp logo

Comments (2)

salsifis avatar salsifis commented on May 10, 2024 1

vim-transpose works with lines of text, not blocks. This is the general philosophy of vim commands (:g, :s, :r).

What is implied in this issue is that you could transpose data in-place when it has the form of a square, and not work on lines.

This could be doable, but:

  • it needs error handling because validation must be done on the squareness of the data;
  • it is not trivial; measuring squareness is not always simple with Unicode for example;
  • it would not be available as a :command, but rather as a mapping in visual mode, for : in visual mode expands automatically to :'<,'>, which means that the intent is to operate on lines.

I am willing to accept pull requests if someone can manage to write such a routine, but I think your best option is:

  • y
  • CTRL-W, n
  • :0put | $d _ (these first three instructions copy your visual block in a separate buffer
  • :Transpose
  • G$, CTRL-V, goyZZgvp (this sequence block-selects result, copies it, closes the temporary buffer, reselect last visual selection, and paste over).

You may map some shortcut to this sequence if needed.

from vim-transpose.

mvrozanti avatar mvrozanti commented on May 10, 2024

damn

well

ok

from vim-transpose.

Related Issues (4)

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.