Closed solyarisoftware closed 9 years ago
Am 2015-01-19 19:53, schrieb Giorgio Robino:
Hi Christian!
First of all I want to thank you for you great work here. Not a real issue indeed, here just few notes and some things that are not immediate to me (vim beginner):
1- Column Alignement If open a CSV file and so I give command:
:%ArrangeColumn
I got colums field right-aligned.
Now, let say I want instead to left-align, I do command:
:let b:csv_arrange_leftalign = 1
I don't have any immediate effect
even if I run again %ArrangeColumn
strange. it seem to me that alignement do not run as a Toggle in runtime. That could be instead an useful feature, I mean a command like :Align {left|right}.
Thanks for mentioning that. You might need to do :%ArrangeColumn! I'll look into it and perhaps add the Align [left|right] command as you suggested.
2- Colors there is a way to change column colouring ?
This should be documented at :h csv-syntax
3- Default behaviours After installing your plugin (last release today), If I open somefile.csv, vim recognize the filetype .csv, header is colored red ann columns ar coloured green/blue without any alignement. Ok, I configure my .vimrc to do some initializations, but maybe alignement with ArrangeColumns could be a defaulyt :-)
That could be done and is documented at :h csv-arrange-autocmd That isn't done by default, since this can be slow for large csv files.
4-Despite your documentation is excellent withoout dubt, maybe a screencast on youtube or similar could help beginners :-) do you thinked about it ?
Hm, good suggestion. I'll think about making some screencasts.
Best, Christian
thanks again Christian!
if i do
:let b:csv_arrange_leftalign = 1
:%ArrangeColumn!
the alignement is now left-justified. ok
afterward if i do:
: let b:csv_arrange_leftalign = 0
:%ArrangeColumn!
I have no effects (I was expected a right-justification instead).
So itseem to me that is no way to change alignement in run-time, but only with a config in .vimrc I well understood ?
BTW, possible new features: center alignement, content-related alignement, etc. :-)
I can modify explicitly colors I see!
:hi CSVColumnOdd term=bold ctermbg=Black
:hi CSVColumnEven term=bold ctermbg=DarkGrey
It's ok, but there is a simple way by example to avoid any colors in colomun (I mean get the default colorscheme vim setting) ?
:hi CSVColumnOdd term=bold ctermbg=default
:hi CSVColumnEven term=bold ctermbg=default
I obtain almost what I was expected, even if vim complain an error E421 (minor note)
A possible new feauture could be just a NoColors
flag (minor point).
inserting in .vimrc
let g:csv_autocmd_arrange = 1
do what I need, you are right a bit slow on huge files, anyway smart behaviour the fact CSV is saved in original format! :-)
First of all: Headers
commands really help! great ;-)
CSVVHeader
instead have some strange behaviour:
if fine if i do just
:CSVVHeader
(I got a vertical split and first column is fixed on the left)
if i do
CSVVHeader 2
I got first 3 columns fixed on the left, losting rìthe vertical split sign | and formatting (you documented it)
Now, a possible proposed behaviour thta i'd find useful could be a command like:
:CSVVHeaderSingle 2
that could act as CSVVHeader but showing just the specified column (the second in the example above).
All in all please let me know if maybe is better to propose you suggestions/new features not as issue (so please close the issue if you prefer), but maybe via email (please let me know eventually)
and sorry for collecting mixed points.
giorgio
Hi Giorgio!
On Di, 20 Jan 2015, Giorgio Robino wrote:
thanks again Christian!
- Alignement
if i do
:let b:csv_arrange_leftalign = 1 :%ArrangeColumn!
the alignement is now left-justified. ok
afterward if i do:
:let b:csv_arrange_leftalign = 0 :%ArrangeColumn!
I have no effects (I was expected a right-justification instead).
So itseem to me that is no way to change alignement in run-time, but only with a config in .vimrc I well understood ?
BTW, possible new features: center alignement, content-related alignement, etc. :-)
Okay, I have done so with the latest commit. You need to specify the special variable b:csv_arrange_align 'rl.' This will right align the first column, left align the second column and decimal align the third column. All other columns will be right aligned.
This should now also be documented at :h :CSVArrangeColumn
2- Colors
I can modify explicitly colors I see!
hi CSVColumnOdd term=bold ctermbg=Black hi CSVColumnEven term=bold ctermbg=DarkGrey
It's ok, but there is a simple way by example to avoid any colors in colomun (I mean get the default colorscheme vim setting) ?
: hi CSVColumnOdd term=bold ctermbg=default : hi CSVColumnEven term=bold ctermbg=default
I obtain almost what I look, even if vim complain an error E421 (minor note) A possible new feauture could be just a NoColors flag. minor point
I have also better documented this. If you don't want extra highlighting, specify the variable g:csv_no_column_highlight = 1
documented below :h csv-syntax
3- Columns Arrangement just in view!
inserting in .vimrc
let g:csv_autocmd_arrange = 1
do what I need, you are right a bit slow on huge files, anyway smart behaviour the fact CSV is saved in original format! :-)
Note, you can also say let g:csv_autocmd_arrange_size = 1024*1024 and then it will only trigger for files smaller than 1MB. (Adjust the values to your taste).
- CSVVHeader behaviour and proposal
First of all: Headers commands really help! great ;-)
CSVVHeader instead have some strange behaviour: if fine if i do just
:CSVVHeader
(I got a vertical split and first column is fixed on the left)
if i do
CSVVHeader 2
I got first 3 columns fixed on the left, losting rìthe vertical split sign | and formatting (you documented it)
Now, a possible proposed behaviour thta i'd find useful could be a command like:
:CSVVHeaderSingle 2
that could act as CSVVHeader but showing just the specified column (the second in the example above).
Okay, how about that: use :CSVHeader 2 to display the first 2 columns and :CSVHeader 2! to only display the second column? That's how I did it now.
All in all please let me know if maybe is better to propose you suggestions/new features not as issue (so please close the issue if you prefer), but maybe via email (please let me know eventually) and sorry for collecting mixed points.
No problem, thanks for the nice feedback.
Best,
Geht die Sonne auf im Westen, läßt der Bauer 'n Kompaß testen.
Hi Christian! To thank you I allowed myself to publish a screenshot about your plugin usage: https://twitter.com/solyarisoftware/status/557977544319057920
Yes, your proposal to do CSVHeader 2! to selct just second column seem perfect! :)
BTW, To do some tests, I downloaded your last updates doing:
cd $HOME/.vim/ftplugin wget https://raw.githubusercontent.com/chrisbra/csv.vim/master/ftplugin/csv.vim
cd $HOME/.vim/ftplugin wget https://raw.githubusercontent.com/chrisbra/csv.vim/master/doc/ft-csv.txt
that's ok ? sory for my ignorance about git/plugin download (previously I installed your plugin using instructions here: http://www.vim.org/scripts/script.php?script_id=2830)
Anyway, in first test I do I noticed that fixed column have colour black (maybe this is what you wanted... probably I agree with the choice!) I also noticed that vertical header (VHeader) exclude horrizontal header (Header)... The best could be to have at the same time a vertical and the horrizontal fixed headers... just an idea...
With VHeader And I experienced some strange behaviours in column widths ... it seem to me that under certain motions, the first colum after the fioxed one, become "restricted" to 1/2 chars... but I have to do more test and before all read your documentation in detail! I apologize for my vagueness now.
About uncolour columns coloring, I insertied in .vimrc file:
let g:csv_no_column_highlight = 1
unfortunately did not does what expected.
Anyway I thank you again, your your big work. giorgio
Hi Giorgio!
On Mi, 21 Jan 2015, Giorgio Robino wrote:
Hi Christian! To thank you I allowed myself to publish a screenshot about your plugin usage: https://twitter.com/solyarisoftware/status/557977544319057920
Nice, thanks!
Yes, your proposal to do CSVHeader 2! to selct just second column seem perfect! :)
BTW, To do some tests, I downloaded your last updates doing:
cd $HOME/.vim/ftplugin wget https://raw.githubusercontent.com/chrisbra/csv.vim/master/ftplugin/csv.vim
cd $HOME/.vim/ftplugin wget https://raw.githubusercontent.com/chrisbra/csv.vim/master/doc/ft-csv.txt
that's ok ? sory for my ignorance about git/plugin download (previously I installed your plugin using instructions here: http://www.vim.org/scripts/script.php?script_id=2830)
How about, I publish a vimball again, that can be easily sourced from within Vim. I have done this previously, but felt like the whole world is now using some kind of a plugin manager and therefore stopped doing so. This means, you would only download that vimball, source it once in within Vim, restart vim and everything should work.
Anyway, in first test I do I noticed that fixed column have colour black (maybe this is what you wanted... probably I agree with the choice!) I also noticed that vertical header (VHeader) exclude horrizontal header (Header)... The best could be to have at the same time a vertical and the horrizontal fixed headers... just an idea...
That is unfortunately not possible and is a limitation of vim itself.
With VHeader And I experienced some strange behaviours in column widths ... it seem to me that under certain motions, the first colum after the fioxed one, become "restricted" to 1/2 chars... but I have to do more test and before all read your documentation in detail! I apologize for my vagueness now.
Whenever you feel, you have something more definite, just tell me and I'll try to fix it.
About uncolour columns coloring, I insertied in .vimrc file:
let g:csv_no_column_highlight = 1
unfortunately did not does what expected.
You need an update to the syntax file.
Best,
Ich kann mir denken, daß ein reiner Dichter einen reinen Kaufmann begreift und schätzt sogar; aber nicht umgekehrt. -- Jean Paul
Hi Christian, thanks for your patience and quick feedbacks!
How about, I publish a vimball again, that can be easily sourced from within Vim. I have done this >previously, but felt like the whole world is now using some kind of a plugin manager and therefore >stopped doing so. This means, you would only download that vimball, source it once in within Vim, >restart vim and everything should work.
yesterday I downloaded directly files from your github repository because it seem to me that vimball here available: http://www.vim.org/scripts/script.php?script_id=2830 is old dated (15 january).
What is the way you suggest to download your last commited updates ? Generally speaking, I like pathogen as plugin manager, so I can mount/ remove plugin easily.
BTW, I updated syntax file from github and now columns uncolouring run smoothley!
I did some test on colums width, I present you soon in a new thread to avoid confusion
Last but not least, I suggest you to put in https://github.com/chrisbra/csv.vim home page your beautiful demo GIF
with command:
![gif_screencast](http://www.256bit.org/~chrisbra/csv.gif)
thanks! giorgio
Hi Christian!
First of all I want to thank you for you great work here. Not a real issue indeed, here just few notes and some things that are not immediate to me (vim beginner):
1- Column Alignement If open a CSV file and so I give command:
:%ArrangeColumn
I got colums field right-aligned.
Now, let say I want instead to left-align, I do command:
:let b:csv_arrange_leftalign = 1
I don't have any immediate effect
even if I run again %ArrangeColumn
strange. it seem to me that alignement do not run as a Toggle in runtime. That could be instead an useful feature, I mean a command like :Align {left|right}.
2- Colors there is a way to change column colouring ?
3- Default behaviours After installing your plugin (last release today), If I open somefile.csv, vim recognize the filetype .csv, header is colored red ann columns ar coloured green/blue without any alignement. Ok, I configure my .vimrc to do some initializations, but maybe alignement with ArrangeColumns could be a defaulyt :-)
4-Despite your documentation is excellent withoout dubt, maybe a screencast on youtube or similar could help beginners :-) do you thinked about it ?
thanks again giorgio