When working with positional data files, it is often very useful to highlight a specific column. In such files it is quite common to have huge "areas" filled with spaces (or NULL
values) and only very sparse data points. In such cases it becomes difficult to read the file.
Here's an example excerpt:
462
63082
01089
75518 735301
53473 017146
37217
07
940376
762 2842
88331
40680 8928
645718
0131
03522
47210 27431
93837
8825072 49479415
52084 8940
0591705 205635
525429
65339 300
0397
1983
0
2605768
121991 648
3892
1260
I found it helpful to simply highlight a specific column. At first I tried to use a regular :match
, but this turned out to be way to slow on huge data files. I posted this as another question. The answer is simple. cursorcolumn
(available since vim 7.3) can be set to a range and is a lot faster as it does not need to match the characters.
Implementing the proposed solution I saw it working. But it's cumbersome, and - knowing vim - there should be an easier way to specify this.
Question:
Is it possible to set the cursorcolumn
range to the columns of the currently selected (visual) block?
vmap
instead ofvnoremap
here? – Abutter