Mostrando entradas con la etiqueta vim. Mostrar todas las entradas
Mostrando entradas con la etiqueta vim. Mostrar todas las entradas

viernes, 26 de agosto de 2022

Vim and Vscode to camelcase

Earlier today I saw a post on vscode subreddit where the author explores a plugin to transform parts of the code from/to camel/snake/kebab case.

Automatically I started thinking how I'd do it in emacs/vim. Given I'm lately not doing so much text munging as I used to, I feel a bit rusty wrt editing-fu. Let's see...

In the video, the guy uses something like multiple-cursors to select the area from the beginning of line till the colon. That was the most difficult thing to me, because neither vim nor emacs have multiple cursors without installing a plugin.

So, I though there had to be a "declarative" way (whatever it means) to do it, and thought of a regexp that would convert the _x to X , for all _ before a colon.

It turns out I could do it quite successfully with vim, just researching a bit how to do lookaheads.

I took 

foo_bar_f: foo_bar,
foo_bar: foo,
foo_bar_: foo  

as my test case, because it has underscores in both sides, it has missplaced underscores, and different lenghts (so we can't use visual block)

This is what I came up with. Visual select and

:s/_\(.\)\ze.*:/\U\1\L/g

I was a bit surprised that it took me a bit longer than expected, and that I had to use a few "advanced" regex features.  

I haven't tried to do it in emacs yet.  Any ideas? Any simplification to my solution?

viernes, 26 de junio de 2020

Some Thoughts on Ergonomics and Compression

A recent personal take on ergonomics and compression:

Why is vim so addictive, and somehow it's difficult to explain to non vim fanatics? I think it's a reification of the process of walking through a text file and doing stuff to it. A concrete way to talk about processes onto text files. Some feel it is strictly superior to GUIs because you can get ahold of it. you can write it down, put it in a postcard, and you have a handle to it. You type it again and it works. there's no syntax or fuzziness or stuff that can go wrong (TM).

Next question: Can you ahold an algorithm in your head? in the same concrete way you hold 'yypVr-'?

I'm lately quite interested in Array Languages and I'm reading some snippets of Apl/J/K. And the feeling is the same. Everything else looks so wasteful and error prone like the point-and-click looks to vimmers.

Example:
Shuffling a vector – breaking ⍵ down into ⍺ pieces from which another vector is built by merging. E.g. if is 'abcdefghij' and is 3, the pieces are 'abcd', 'efg', and 'hij', and the result is 'aehbficgjd':

⍵[⍋⍋(⍴⍵)⍴⍳⍺]

The ergonomics are pretty different from what we're used to, but there's definitely an emergent property there. It's not just "it's shorter to type".

miércoles, 6 de mayo de 2020

Recreational vimming


When I have to do some sort of development or file editing inside a container, I usually have vim there but not emacs. docker-tramp is very useful but sometimes I just want to edit there.
The .vimrc I have in my container has only one line (I can't function without it):
imap jk 
Let's say I'm editing a lua script. After I've saved and c-z and run the file several times, I realize what I want is to have is:
:nore ,rr :!lua %
Then I can test it much quicker. But I realize I'm always :w before,rr. Colon, up, and modify the line to:
:nore ,rr :w:!lua %
Accidentally I quit vim and realize I have to set that again, so I go to my vimrc and add this:
nore ,rr :w:!lua %
nore ,vimrc :e ~/.vimrc
nore ,so :source ~/.vimrc
With this I have a pretty nice way to iteratively finetune my config. After some lua editing, the only thing I need to do often (and not provided by the excellent vim default functionality) is to comment and uncomment code.
nore ,cc :s/^/--/
nore ,cu :s/^\( *\)--/\1/
This gives normal and visual comment/uncomment functionality, and enough interactivity to build your ad-hoc shortcuts as you go.
This is an example that just happened yesterday, and the nice thing is that it grows and flows from 0. I couldn't get to this amount of functionality from an emacs -Q in such a small time. It has such a different feeling to configuring emacs. It reminds me of my Perl days, it's fun and quick. And the language is very orthogonal, with very few abstractions. It's the APL of text editing.

This is my take on this reddit thread. 

martes, 22 de enero de 2019

Formatting JSON

Here's something you probably had to do at some point. You have some big json blob and you want to format it nicely.

I had done this in vim and honestly, it comes very very easy.  In vim, if you have a buffer (/tmp/foo.json) you want to reformat, and you have jq, the nicest way I've found is something like:

:r !jq %

This is really hard to beat, and I'm not sure you can be much faster in any other thing.

But I live inside emacs, and I when I have this need, until now, I was selecting the region, then `M-| jq .`  The problem is I always forget about m-|, and it's really annoying to type it anyway.

So I was about to create my elisp function that would reformat my json region, and before coding it, I timidly tried M-x json-form..  and yes, of course, json-reformat-region is already there (you can download it from melpa).  Job done.

Btw, if you use evil, you can also use ':r !jq /tmp/foo.json'.  For some reason, % doesn't work as a substitute for the current buffer-file-name, but at that point, I don't care much. :)

lunes, 19 de junio de 2017

TIL: evil-buffer-regexps

So I have my evil-mode perfectly adapted to my workflow, activating or deactivating it by default depending on the major-mode, so that I don't get into normal mode on magit buffers, or sly-*, or eww.

BUT, there are some buffers which you cannot easily control, because they reuse some major mode where I usually want evil-normal, but not in those cases.

In my case, it's *sly-macroexpansion* and *sly-description* buffers. They are both "lisp-mode" buffers (for syntax highlighting purposes and such), but I want 'q' to quit them.   As they do not represent any file, I was out of luck binding modes to file extensions. (btw, here's some recent article talking bout the ways emacs chooses your major mode)

So trying to hack something using emacs hooks, I found that, in fact, evil has us covered, and provides a evil-buffer-regexps, that allows us to predefine modes on given buffer names.


(add-to-list 'evil-buffer-regexps
             '("\\*sly-macroexpansion\\*" . emacs))

viernes, 8 de abril de 2016

My mail signatures: 2006 - 2016

2006

--
Vi is clearly superior to emacs, since "vi" has only two characters
(and two keystrokes), while "emacs" has five.  (Randy C. Ford)

2016

--
"Emacs saves you time when you work, and takes it back when you play with it"

lunes, 4 de mayo de 2015

feh image viewer

My need for viewing images is really low. Just a few screenshots and funny pics, but I need some app to view them.

I usually use emacs for this task, but there's this little suckless app, feh , which is doing its job quite well. I use it to set the background image on my laptop

exec feh --bg-scale ~/dotfiles/wallpapers/sun.png

and I just configured it to accept vim-ish keybindings.

sábado, 11 de enero de 2014

Evil: The exact amount of vim in emacs (but no more than that)

I love emacs, but I also love modal editing.  Evil was (and vimpulse before that), was a great finding.

What I want is to have a normal mode where most commands feel like vim, and an insert mode where most commands feel like emacs, so c-p would do previous-line in insert mode instead of autocomplete word. Here are some of my tricks (many of them gathered from other people's configs)

99% emacs insert mode

Although using lots of insert mode commands when I was using vim daily, now I hardly find the necessity for them.

(setcdr evil-insert-state-map nil)
(define-key evil-insert-state-map [escape] 'evil-normal-state)

And that's it. with this, you're mostly done. In insert mode, every key but escape will behave as in plain emacs.

Undo-tree? nah (99% of vim in normal mode)

I still prefer emacs' undo-redo schema than the undo-tree. In the docs (also in the code), evil states that undo-tree will be used if available, and regular undo-redo will be used in case it's not there. That sounds fine, but if you get evil from elpa, undo-tree will be downloaded and installed without asking.Uninstalling undo-tree afterwards is not an enough because when loading, evil will complain it has some unmet dependency.

To make evil forget about it I edited the evil-pkg.el in my ~/.emacs.d/elpa/evil-xxxxxxx/ dir deleting undo-tree as a requirementand leaving it like this:

(define-package "evil" "20140109.605" "Extensible Vi layer for Emacs." '((goto-chg "1.6")))

c-r tries to redo

Just remap the desired key in the chosen mode to your prefered function.

(define-key evil-normal-state-map (kbd "C-r") 'isearch-backward) 
With these few tricks you can hack further to fine tune your keybindings and submodes inside evil. If you dig deeper into its code, you'll see it's quite well organized and quite clear.

sábado, 17 de marzo de 2012

shell and vim superpowers


It seems that the commandline is making a comeback, maybe with some hype. At least, I keep seeing more and more articles with titles like 'vim advanced features', courses like 'programando a toda leche con vim' (that are not cheap at all), or extensive articles like use unix as an ide or the zen of the vi wu wei (I like these 2), and other articles with this similar topic. It's amazing how people are reinventing the same wheel every other decade.

But out of these new tutorials that (mostly) bring nothing new to the scene, once in a while you find some useful tips or tools that people build that add orthogonal functionality (if that concept exists), and allow faster access to things, or better interface to them (note the orthogonality of the word 'thing').

You know, there's no problem that another level of indirection can't solve. So here you are. a couple of projects that allow you to refer to files, directories, and git stuff by numbers. fasd and git-number . The first one based on autojump.

Unfortunately, the web is so volatile that I can't find many of the top 10 vim articles from past decade, but I have seen isomorphic articles to this one by thousands. during the last 10 years.

So welcome guys, let's invent the future now! :)

sábado, 16 de julio de 2011

open rails files from console to $EDITOR

You're in the console, run rake test, and appear a bunch of file paths cluttered with line numbers, colons, and no spaces between them. Well, lest turn the no-space-between them thing in a WIN for us.

Errors and failures show in different formats when running tests (not a very *intelligent* thing if you ask me, but...). Well, a simple regex and we have 'pe' , powered-emacslient, path-edit, or whatever. In my shell, double click any of the two versions and 'pe ', and you're sitting again on your editor. placed in the correct line.

.. app/models/bar.rb:88:in ..
.. [test/unit/foo_test.rb:9]: ..



'e' is the original emacsclient script I use for other files. Unifying both scripts in one is left as exercise to the reader.

I want to spend an afternoon hacking a urxvt plugin to fetch for strings ressembling paths, and be able to open them using just keyboard, but that's a thing for another day.

martes, 14 de junio de 2011

vim.orthogonality > emacs.orthogonality

I already mentioned this same thing in other posts, but well, today I stumbled upon another example of it.

Vim is like a unix commanline, lots of little commands you can combine one to each other. It has the cognitive style of linux command line

bufdo,argadd,argdo... These are the 'pipes' of vim. multiplicity enablers that add functionality,commands and power in an exponential way.

When writing ReST docs to take notes at university, I used Vim, and I got used to underline titles with an add-hoc sequence I made up (yank line,paste,visual line, replace, char) . Vim doesn't need a specific command for it, because it's immediate, and like most vim combos, it's like talking to it in a funny slang.

On the other corner, emacs: as part of emacs-goodies (ubuntu package with a bundle of emacs plugins) There's under.el. A plugin that exports 'underhat-region'. A function that underlines a region with caret characters. The bad thing of underhat-region is that it's not parametrizable, but that's not the point. The fscking point is that in emacs you end up stumbling upon functionalities that are already there as commands, but probably sunken among zillions of other commands.

I'm more a vim-style guy myself, but couldn't resist emacs+vimpulse combination. I think I'm sold.

lunes, 4 de abril de 2011

What you can't see CAN hurt you (or, at least, annoy you)



Most of the times, and programming in sane (cough, cough)
programming languages, things like whitespaces, tabs and newlines
won't do you much harm. they work as separators for tokens (unless
in a string).

But that doesn't mean that you can't get trapped into some gotchas
related to whitespaces or newlines. One example everyone has dealt
is lineFeed vs carryReturns vs CRLF.

There's a funny article from fxn on O'Reilly site talking about
the secrets and gotchas of newlines.


As a long time vim user, and nearly a year of using emacs (with
different intesities), I care a lot about my editor features, and
one feature that's really useful is the 'select paragraph'. Both
emacs and vim can do this out of the box, but there are some
problems when you aren't careful enough and leave apparently blank
lines that are full of spaces, tabs or any invisible characters.

In vim, you can delete all trailing whitespaces with a simple
regex. Of course, you can create a command to do it for you, or even
map some keybinding to execute %s/\s\+$// , but I'm ok with typing 10 chars for it.

In emacs, of course there's a command for deleting trailing whitespaces, and, guess what?
it's called delete-trailing-whitespaces :) .

If you want emacs to show trailing whitespaces, there's a buffer-local variable called
show-trailing-whitespace that you can set to true. Here's the official emacs doc

Emacs has a command called 'whitespace-cleanup' that bundles some sane (configurable) rules to clean most annoyances related to whitespaces.

lunes, 7 de febrero de 2011

Put more vim into your emacs


I'm a vim editing model fan, but emacs is slowly crawling into my
life. emacs had viper (vi emulator) for ages, but it falls short if
you're a vim power user. Vi is not Vim.



For some time there's been vimpulse package that tried to narrow the
difference, adding Visual mode, and some other goodies. Recently,
vimpulse got reactivated, and now, we get text objects, and many
other features from our beloved text editor.



You can even use map, imap, vmap and the like;



the first thing I tried was mapping jk to esc, but the tip in the
vimpulse wiki didn't work. I managed to make it work with this line
in my .emacs file.



(vimpulse-imap "jk" 'viper-exit-insert-state)



Now, there's no need to reach the far escape key.

sábado, 5 de diciembre de 2009

search in multiple buffers in emacs and vim

Want to look for a word in a number of buffers?

No problem, emacs can do it with a simple command (the problem is remembering hundreds of "simple commands" :/ )

emacswiki gave me the solution .

The command is multi-occur.

It lets you select in which buffers you wanna perform the search.

My use case though was knowing in which irc channels appeared a given user.

Then, the command is:
  C-u M-x multi-occur-in-matching-buffers
it lets you write a regex for buffers to search, so I wrote "#.*" , and then the word.

As simple as it can get.

Thinking how I'd do it in vim, normally I'd do a normal grep (using ack) or vimgrep, but as emacs can map buffers to non-files, grep wouldn't work.

Vim offers quickfix window that can be easily combined with both grep and vimgrep, and one can download theese two plugins. AFAIK none of theese plugins can search in some but not all opened buffers.

Any other vim solutions are very welcome.

miércoles, 11 de noviembre de 2009

using Vim regexes everywhere

I'm at class atm, and 5 minutes ago I had to download some exams from past years.

There are quite a lot of them, and I just thought downloading them all by hand would be too much work for a Lazy man like me.

Then I used vim to help me :)

I just got the code where there were the links I wanted. It looked more or less like this:


<a href="2006t-c-40-lc.pdf">g40</a>,
<a href="2006t-c-40-lc-s-test.pdf"> solució del test</a>;
<a href="2006t-c-50-dc-test+problema.pdf">g50</a>,
<a href="2006t-c-50-dc-test_resuelto.pdf"> solució del test</a>,


Just open vim, paste the code and let the magic begin.


:%s:href=":http\://studies.ac.upc.edu/FIB/XC/:
:%s:.*http:http:
:%s:".*::
:%s:^:wget :
:w /tmp/downThemAll.sh


Now you just have to execute the script, and enjoy :)


Btw, yeah, I know about downThemAll, but I like using my own tools (and I dislike bloat).

domingo, 20 de septiembre de 2009

Fully vim style linux - part 3 - Get geeker

In this third part (part1, part2) , I'll explain how to get a couple of programs act like vim. With 'act like vim' I mean understand hjkl, and probably nothing more, but if you are really addicted to vim, you know it makes a great difference, right?

pdf viewer


If you're on ubuntu (then you should try vectorlinux, really) , you probably use evince to open pdf files. Well, surprise! evince (at least in ubuntu 8.04 with no extra tweaks) knows what hjkl mean, so you're done :)

If you use xpdf, you can teach it hjkl adding the next lines to your ~/.xpdfrc

bind h any scrollLeft(16)
bind l any scrollRight(16)
bind k any scrollUp(16)
bind j any scrollDown(16)
you can find out more about theese comands in xpdf's man page

xchm viewer

Chances here are xchm, kchmviewer or firefox with a chm viewer plugin.

I haven't seen any option if you use xchm, but kchmviewer can be configured to behave vim-ish (only if compiled with qt libs enabled). pressing ctrl in kchmviewer underlines all links in the view, and makes them accessible with a keystroke.

One of the safest options is using any firefox plugin. Then, hopefully, vimperator will do all the dirty job.

DIY


Apart from all those programs, you'll end writing your own tools to help you in your daily tasks.

Then I recommend you a couple of apps/libs.

First is ratmen/9menu/ratmenu . A simple menu aplication that generates menus navigable with hjkl. Priceless

If you feel like programming your own tools, perl module Curses::UI has all bindings you need... by DEFAULT!

On part 4 I'll talk about shells and gtk, and maybe...emacs!

PS: If you have suggestions, or you just liked the post, or... please comment!

viernes, 24 de abril de 2009

Fully vim style linux (part 2) - Vim for latex

Writing documents with latex with vim is fairly pleasant because you have your usual maps available, and you can configure most things with scripts but, as always, someone has already done that (don't reinvent the wheel).

latex-suite


Latex-suite is a great and very complete set of plugins for vim that helps writting faster latex with vim. It has lots of options and configuration bits, but you only need to remember a tiny set of shortcuts to use it (at least at a beginner level)

Environment complete (F5) . you're in a document and you want to insert a tabular environment. Just type 'tabular' and press F5. a full tabular environment will be placed right there, with the appropiate number of params and placeholders (you can navigate to the next placeholder with ctrl-j).

Package inserting (F5): in the preamble section, if you press F5 after typing a word, latex-suite will enclose it into a \usepackage{word}
snipMate

Compiling (ll) : to compile a document, just press your leaderkey followed by 'll' (that's two 'els').

View the compiled doc (lv): just type leader lv to open your viewer program with your dvi/pdf file in it.

There are lots of other useful things in latex-suite. you can find further info in its website.

LaTeX::Table

Tabulars can go from the simplest things to fairly complicate structures. Let there be perl.

There's a small module named LaTeX::Table that helps us to make pseudo ascii tables, and put some options embedded in a comment, and it converts them to fully functional tables.

Try cpan:

sudo cpan LaTex::Table
It uses Moose (a great modern OOP system for Perl 5), so if you don't use perl regularly, cpan will probably install a big bunch of perl modules.

If you have any problem installing those modules from cpan, you can always install them (or at least, the one that fails) with the good old method:

perl Makefile.PL, make, make install

Now a usage example.

theme=Berlin;caption_top=1;caption=foo
one & Two & Three
CAN I & haz a & CHEEZBURGER
& OH & KTHX
FOO & bar & Baz
Just visually select it and apply the !ltpretty filter. You're done

Latexhelp

With latexsuite, there is a latex reference in vim help format, so you can access the syntax of latex commands easily in vim. It doesn't need additional configuration, provided you placed the latex reference file in your doc/ directory and ran helptags on it. Probably :helptags ~/.vim/doc will do.

you can find the separate doc files here.

vim config

There are lots of possible configurations depending on your workflow and/or preferences. My configs are just theese lines.

let g:tex_flavor='latex'
let g:Tex_CompileRule_pdf = 'pdflatex -interaction=nonstopmode $*'

More things

As you probably know, learning to use vim effectively has many paths to go, and what is useful for me, can be painful for you. You can combine plenty of other vim plugins to help you writting faster latex.

For example, using snippetsEmu/snipMate/whatever snippets plugin can be useful, using supertab can speed up your (general) writting, or even little maps like the ones explained in my previous post 'Fully vim style linux (part 1)' can enhance your typing experience.

Please post comments about comments/improvements, and I'll make the appropiate updates.

See ya in the next post.

domingo, 29 de marzo de 2009

vim and rst, a confortable way to do presentations

I've been hunting for a good app to write slides without much success:

I've tried from powerpoint-esque approaches, to text presentations with tpp . I haven't found a single good one, but well...

  • Powerpoint/OO slides failed. GUI. Big Files. I don't like to work visually with those kind of programs.
  • tpp and magicpoint failed. Too naive, or too dificult to configurate.
  • Latex-beamer was good enough. Bad thing is I have to insall latex, where usually I don't have installed. Very professional look. That's a big++.
Having tried nearly all typical programs (I don't use Mac , so keynote is not an option), I decided to go into a DIY mood finding more 'housemade' apps.


  • plain HTML templates. Probably, when I have some time, I'll do a perl script to embed text into chained html's with a common structure. I think it's the best option available (oh duh, isn't it sad?).
  • text2tags | markdown | rst . For the moment, I'll go with rst, using a vim plugin to generate the final html or s5 slides. It's easy, it's vim, it's lightweight, it's html, it's portable.... I just would like it was more clear and easy to modify...


What I've choosen is vim vst plugin . A plugin to generate html, s5 or latex from a simple syntax based on ReST.

It works quite well for writting short to medium sized texts, without having to think about presentation.

Give it a try and see.

Some css here http://www.rst2a.com/gallery/html/

Addendum: EPIC FAIL for presentations. Depending on the resolution, text doesn't fit the screen. If you limit to 10 code lines, you probably get no problems, but... For plain html it's quite good and straight to write.

miércoles, 25 de marzo de 2009

Fully vim style linux - Part 1

That's the start of a group of threads related to converting your linux experience to the most vim-ish way.

My aim is to get every application I use behave as vimish as possible.

That means:
  • Understand hjkl
  • Being able to find using '/'
  • Maps or at least some kind of extensibility
  • If we can't go vim, let's go screen, or even emacs ( keyboard >> mouse )
My use cases are the typical ones for any programmer and internet surfer:
  • Editing text
  • Browsing
  • Reading pdf's and chm's
  • Playing music (local mp3 or streaming)
  • Chat (IRC, msn)

Editing text with vim

First things first. If you want vim shortcuts everywhere, you should first learn vim deeply. That means getting used to hjkl, mappings, trying plugins and so.

There are some plugins that are a must, if you ask me. For example:

  • snippetsEmu or snipMate
  • parenquote
  • surround
  • pastie
  • FuzzyFinder or 0scan
there's plenty of info about vim in the net, so I'm not going to rewrite what's been already written. Only two little tips for your .vimrc

:nnoremap ,vimrc :new ~/.vimrc
:nnoremap jk <esc>
A 'quick' shortcut to edit your vimrc when you think: "Oh, that map is darn cool, I must have it in my vimrc". Just press ',vimrc' and you have your vim config file ready to edit.
The second one is pretty obvious, but it's one of the coolest tricks I've seen. No more pressing escape to go to the normal mode.

Browsing
If you're short on resources, use opera. Calmar has a pretty nice opera config file for vim keybindings in his page
For those using firefox, you MUST use vimperator. It's the reason why I switched from opera to firefox. With vimperator, your firefox will be really close to vim. You can use the common navigation shortcuts (hjkl, gg, G, c-o, c-i ,c-d, c-u, c-b, c-f), and it allows some cool way of navigate the web. For example:

  • gu : 'go up' . loads the url you're on from the start till last '/'. That means, travelling one directory up if you're browsing an ftp. http://www.foo.com/bar/lala/baz.html -> gu -> http://www.foo.com/bar/lala/
  • gU: 'go (really) Up' . Loads the main page on the server. From the begining of the url till the first '/' .
  • [[ and ]] are for traveling through document hierearchies. Hey ! that's my patch! . If you're browsing a document written with latex2html, or there's a link with the text 'prev','previous','<' or '<<' ,or their obvious counterparts, [[ and ]] will load the page pointed by them.
  • f. It activates the 'quick hints' mode. Typing substrings of text links, or the number assigned to a given link, it vimperator will load the given page when the typed string points to only one. F does the same but opens it in a new tab.

Vimperator is very customizable, with a plugins system and a vimperatorrc file that's read when you run vimperator. Tips:

:noremap ,vimrc :!gvim ~/.vimperatorrc
:noremap <Left> gT
:noremap <Right> gt
Pretty obvious, right?

type :h in vimperator to see a quick tutorial and the docs.

Cya

miércoles, 19 de noviembre de 2008

Problema:

Tengo un archivo con el formato siguiente:
-------------BOF

Matriu 0
1foo.map VS 0.A.map 0.565 0.382291 0.370989 0.298857 0.705638
....
1foo.map VS 0.e.map 0.257588 0.940875 0.872144 0.634201 0.844375
MITJA1_0= 0.574908 0.353649 0.339477 0.268343 0.691255
MITJA2_0= 0.55557 0.307795 0.296409 0.235522 0.517165
MITJA3_0= 0.492392 0.527022 0.484869 0.354612 0.536407
Estadisticas: 1, 2, 3 ,4,5

Matriu 1
1foo.map VS 1.A.map 0.521194 0.479164 0.464836 0.374049 0.753356
1foo.map VS 1.Br.map 0.521194 0.479164 0.464836 0.374049 0.759565
...
-----------EOF

Necesito agrupar los valores de la ultima columna (negrita), poniendolos en una fila, y en cada fila tiene que haber los valores del mismo 'map'. (cursiva). Como quedarse con las ultimas columnas y trasponer....

Ah, suponemos que tenemos unos 1500 maps distintos, y que cada map tiene 22 valores.

Bien, pues esto, nose como lo haríais, pero si encontrais algo que supere esto, me lo comentais ;)


:g:^[^1]:d
:%s:.*VS::
:%s:.* ::
qq22Jjq
1500@@


Efectivamente, solo eso