Comments (2)
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.
damn
well
ok
from vim-transpose.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-transpose.