Skip to content
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

.PSV not working #45

Open
aaaaapiche opened this issue Jul 13, 2017 · 3 comments
Open

.PSV not working #45

aaaaapiche opened this issue Jul 13, 2017 · 3 comments

Comments

@aaaaapiche
Copy link

Hi Guys -- I'm trying to use this with a pipe-delimited file, and it's not working. I've tried naming the file as .psv, and setting the syntax to Advanced CSV. If i find and replace "|" with "," everything works. Problem is the file i'm working with also contains non-delimiting commas, so i'd rather not use that workaround.

Any help would be appreciated -- i love the functionality this plugin offers.

@wadetb
Copy link
Owner

wadetb commented Jul 17, 2017

Hi there, I just did a quick test in ST3 and it seems fine. I created a new file, saved it as test.psv on my desktop, and typed in the following text:

name|favorite color|age
mary|blue|25
tom|green|37
alex|purple|7

The justify columns command worked properly on this text. Does it work for you if you following the same steps? Can you paste an example to the issue that doesn't format correctly for you? Thanks!

@aaaaapiche
Copy link
Author

Thanks for the quick reply! I followed the same steps you describe above, and the formatting is not working as I expected. I tried a .csv for comparision, and it worked as expected. Also the syntax highlighting the .csv looks as expected while the .psv does not:

Test steps:

  1. copy the text you reference above, and set the syntax highlighting to "Advanced CSV"
  2. save as test.psv (and test.csv respectively).
  3. Justify (CTRL-comma, spacebar)

.csv
image

.psv
image

@wadetb
Copy link
Owner

wadetb commented Jul 18, 2017

Thanks for the steps, I was able to reproduce the behavior! Looking in the Output pane, I see:

Using delimiter: '|'.
reloading /C/Users/wbrainerd/Desktop/test.psv
Using delimiter: ','.

So it seems the delimiter is overridden after the reload. If I then right click in the document and use CSV: Set delimiter and enter a | character, then it works as expected.

One possibility is that the "," choice gets recorded into the per-view settings as an override.

BTW, about syntax highlighting, unfortunately the syntax file is not delimiter-aware and I'm actually not sure if it's possible to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants