Wednesday, December 31, 2014

navigation in diff mode with the csv plugin

If the csv plugin is used while editing two files using gvimdiff, then
the number of key strokes to navigate out of a fold is equal to the
number of lines in that fold. Normally, this would be a single key
stroke. Here the key stroke can be a right or left arrow depending on
whether the user is trying to navigate down or up.

To reproduce the issue, consider the following files.

rajulocal@hogwarts:~/x$ cat file3.csv
k,k,k
a,a,a
m,m,m
a,a,a
r,r,r
a,a,a
j,j,j
u,u,u
k,k,k
a,a,a
m,m,m
a,a,a
r,r,r
a,a,a
j,j,j
u,u,u
rajulocal@hogwarts:~/x$ cat file4.csv
1,1,1
2,2,2
3,3,3
k,k,k
a,a,a
m,m,m
a,a,a
r,r,r
a,a,a
j,j,j
u,u,u
k,k,k
a,a,a
m,m,m
a,a,a
r,r,r
a,a,a
j,j,j
u,u,u
1,1,1
2,2,2
3,3,3

When I do
rajulocal@hogwarts:~/x$ gvimdiff file3.csv file4.csv

The lines 7-10 in file3.csv, 10-13 in file4.csv are folded into a
single line. However, to traverse down the fold, I need to use the
right arrow key 4 times instead of just one.

I am using a Debian Jessie machine with the following vim packages

rajulocal@hogwarts:~/x$ dpkg -l vim\* | grep ^ii
ii vim 2:7.4.488-2 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:7.4.488-2 amd64 Vi IMproved - Common files
ii vim-gtk 2:7.4.488-2 amd64 Vi IMproved - enhanced
vi editor - with GTK2 GUI
ii vim-gui-common 2:7.4.488-2 all Vi IMproved - Common GUI files
ii vim-runtime 2:7.4.488-2 all Vi IMproved - Runtime files
ii vim-tiny 2:7.4.488-2 amd64 Vi IMproved - enhanced
vi editor - compact version

The csv plugin, csv-0.30.vmb is from
http://www.vim.org/scripts/script.php?script_id=2830

The problem occurs only when the filetype is set to 'csv'. If I
manually change it to 'text', then there is no problem.

thanks
raju
--
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: