-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:InitCsv
overrides locally set b:delimiter
#43
Comments
Does the latest commit help you? |
Afraid not. Given the following file (which is named "f.csv", so that filetype is csv):
Opening it, by default, the CSV plugin sees and highlights six columns instead of three, because the default So I set
This works, and correctly recognizes the columns (though the highlighting is still wrong). But for whatever reason (e.g., to update the column highlighting), if I then run :InitCSV It goes back to using " :echo b:delimiter Here is what I use to make ad-hoc changing of the delimiter on a file-by-file basis more convenient:
Incidentally, the following works fine, with the highlighting correct:
|
Hi Jeet! On So, 08 Feb 2015, Jeet Sukumaran wrote:
Try using :InitCSV! Best, ChristianAlles Lebendige bildet eine Atmosphäre um sich her. |
Ahhh! This works perfectly! Thank you for a great plugin! |
BTW, I have updated the on-the-fly delimiter changing script:
|
If I set
b:delimiter
for a file (and updateb:col
accordingly) to handle a custom delimiter for a file, and at any time that call:InitCsv
, theb:delimiter
value gets set again to the default org:csv_delim
.There are situations when
:InitCsv
might need to be called to, e.g., update/change highlighting, but we want theb:delimiter
preserved if it was manually changed.Since
b:delimiter
is set automatically, and there is (I think) no way to tell if it was manually changed, I suggest a non-userspace variable (e.g,b:_delimiter
) that is set tog:csv_delim
automatically, but is only used ifb:delimiter
is not set. But maybe some other solution would be better.The text was updated successfully, but these errors were encountered: