Code Monkey home page Code Monkey logo

vscode-edit-csv's People

Contributors

ceribe avatar dependabot[bot] avatar janisdd avatar lurch avatar trevorsayre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-edit-csv's Issues

How to change the delimiter for an open file?

I've opened a .tsv file, and the extension seemed to have picked comma as the separator, which of course isn't the right one since it's a "tab separated values" file. So then I opened up the top bar ("Read options", "Write options", "Preview", etc.) and selected "tab" as separator by clicking the icon next to "Delimiter". The tab character is inserted into the box below, but clicking "Apply" doesn't change the display of the table. This seems like the correct procedure, right?

Feature request: hide comments

Hi!

I'm using this extension to display profiling info from CodeXL/rocm-profiler, because this is the only CSV visualizer that works in remote sessions (the others all communicate through sockets/ports which are not enterprise firewall friendly). I am not so much interested in editing the data, just seeing it as nicely tabulated, dark theme friendly spreadsheet. My data usally has 8-9 lines of comments leading the datafile holding metadata of the execution environment. 99% of the times, this is uninteresting, but I cannot turn tell CodeXL to omit these comments.

Could Edit CSV be told to not display comments?

Add possibility to freeze first column

For some projects it's good to know the first column for files where the first column is an identifier for the row and it has a lot of columns. Some of the files I am editing has 50+ columns so you will either have to select the row or remember the position to edit columns far to the right in the editor. This can become a bit of an issue if you are scrolling while looking at columns for different rows.

Amazing extension though, thanks.

The feature with showing the header is also very nice, could be the same for this to be honest. We are using strings to identify the id of the column instead of the index. Could be the same here as you did with the header, replace the column index with the first column. Both features would be amazing though.

Request: compact view

This is a feature request. Please consider:

  • adding UI setting for a "compact view" where the navigation elements and buttons at the top are smaller
  • adding user settings where the font sizes/padding/margins can be tweaked (if not in settings UI, perhaps via editing CSS for power users)
  • making the extension more responsive or relative to editor font size and VS Code zoom/scaling settings

I have small workspace and UI fonts selected, and I've also scaled VS Code down (ctrl+minus) so shrink the overall size of the editor and let me show more content on the screen at once. However, these changes doesn't seem to impact this extension's navigation row or buttons, or at least, not enough for me.

This is a screenshot that shows the font size in the Edit CSV tab navigation is almost twice as large as the tab and sidebar text. The command buttons are also large, but not as large, and even the font size in the table itself is larger than the text the rest of VS Code is using.

image

Thank you for the Edit CSV extension, your work is truly appreciated.

EditCsv interprets all lines as comments if Read Options > Comment is blank

When opening a csv file with EditCsv the table will display all data as comments. The Read Options > "Comment" field is blank. The "Has Header" toggle is enabled but does not change when clicked. The "Delimiter" field tooltip says "auto - (detected: ,)" which is correct for my file content.

If I enter a character into the "Comment" field (such as "#") and click "Reset Data" the csv file will load into the table correctly and I can toggle "Has Header" on.

If I close the EditCsv editor tab and reopen the csv file with it, the Read Options are reset and the above process must be repeated to correctly load the csv file into the table.

I have tested disabling all other extensions and reloading VSCode and EditCsv still shows the same behavior.


VSCode:

Version: 1.39.2 (system setup)
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-15T15:35:18.241Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.14393

EditCsv:

Name: Edit csv
Id: janisdd.vscode-edit-csv
Description: extension to edit csv files with a table ui
Version: 0.1.4
Publisher: janisdd
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=janisdd.vscode-edit-csv

will not render medium sized csv

I have noticed this plug-in processes for a second, flashes a render for a split second and then hangs on "rendering table" when trying to work with csv's of even moderate size. The current file I'm working with is ~2.6MB, but I have noticed this many times and I am just getting around to reporting.

I remember reading something about rendering disabled above 50MB?

One of my primary uses is to check and apply alternate formatting such as when one application needs strings quoted and another application needs them unquoted - is there a way to force it to render at least a portion of larger files where you can preview and apply such read/write options?

I am using Windows 10, latest version of VS Code and extension as far as I know. Thanks!

Feature request: text wrap toggle

Thanks for this plugin! It's fantastic and lets me avoid all the wonderful ways Excel f&*$s up my csvs. I notice that the extension now wraps text, which is nice to be able to do, but I'd also like to be able to turn that on or off. Additionally, if the wrapped text moves off screen, the line height can change, which can be a little jarring. Example below:

csv-editor

I can see how in some cases this variable line height could be desirable, but when I'm trying to track a row while scrolling right and left, it's really hard when line heights keep jumping around. This problem would be solved for me though if I can just turn off all text wrapping so that all lines are the same height.

Thanks again!

Auto reload from disk

Would it be possible to make the csv editor automatically detect changes to the file on disk, and reload? For example, if I do a git pull. We had an unfortunate accident yesterday with a few commits getting overwritten, because we didn't think of reloading the editor before making our changes. It could just be the "simple" notepad++ version, where you get a notification if there are changes on the disk, so you know at least. But it would be even better for us if it just did it automatically.

EDIT:
I looked a little bit at your code, but I am by no means and expert in either typescript or vs code plugins. I think you could just add a "file has changes" check to preReloadFileFromDisk I would assume, and only continue if there are actually changes to the file on disk. Then call that function every x seconds, would be a very simple solution. It would then work exactly like Notepad++, except you would need something to handle if people press "no" to the popup, so it doesn't just keep asking, but disable the infinite reload check until the next save or reload from disk.

EDIT 2:
If you could then on top of this add 2 settings, one for enabling this feature and another for whether it should ask before reloading. You can of course default them however you want. That would be amazing.

Have last line be an empty line

I know it's not default behavior, but apparently the old system our text files are running on expects the last line to be an empty line. Would it be possible to add an option so we can add a newline after the very last row?

Other than that, I made everything work, it now looks exactly like our default txt files. I just had to dig a bit into your options and I fixed all of it.

Basically add a newline character after the last row as well, is what I want.

White background when editing as csv

I installed the latest version of VS Code Insiders, and now when I "edit as csv" I get a really ugly white background. Since much of the UI uses gray text, it is also low-contrast and hard to read now.

image

Tips?

" " Gets changed to another value

If you have a empty cell and you want to change its value to " "
The value is displayed as " " but saved as """ """

So in the csv file it should look like this: value1," ",value2
When you apply and save it get changed to: value1,""" """,value2

Awesome app though.

View resetting and column resizing on save button press

What OS?

  • Windows 10 Pro (version 1909)

Version?

  • vs code plugin

Description

When pressing the one of the save buttons the view is reset (jumps to top left) and the custom set column size is reset to the default length (that matches text length)

Why is this an issue? I'm currently editing a large csv file that contains localization text for multiple languages.

  • Resetting position takes me away from where I was making edits
  • Resetting column size is annoying as some text is very long (e.g. smaller paragraph), so it's easier to set custom width

Steps to reproduce

A step by step guide how to reproduce this issue/bug.

  1. Create a csv file containing a few rows (enought to enable vertical scrolling) and a few columns (some of which contains cells with very long text that enables horizontal scrolling).
  2. Scroll to the bottom of the file and shrink the long columns so that you can view all columns without scrolling.
  3. Make some modifications to any of the cells and press either the "Apply changes to file and save" or the "Apply changes to file".
  4. As a result, the editors position should be reset to the top left of the "spreadsheet view" and the long columns should be expanded to their "default" size.

Expected behavior:

  • View stays where it was at the time of pressing the button
  • Custom set column widths are not modified
  • These values/parameters are temporarily stored so when reloading the view they can be loaded

Files with more than ~1MB are loaded and saved wrong

Files with more than ~1MB are loaded and saved wrong.

After the first ~1MB content the content of the ~1MB is repeated until the file size is reached.

Actual: [1MB aaa...][1MB aaa...][1MB aaa...] = 3MB

Expected [1MB aaa...][1MB bbb...][1MB ccc...] = 3MB

This was due to a counter was not properly incremented in util.partitionString

Multiple header lines

Many of my CSV/TSV files have multiple header lines that have totally different number of columns. Right now this makes CSV-Edit render the display of the actual table rows wrong. File example attached.

My proposal is to add a "header row count count" box to the right of the "Has Header" switch in the "Read Options" pane.

List_suspended_20190918.zip

Ability to add more extension types

I use the extension "Rainbow CSV", which adds some custom Language Mode types into VSCode, i.e. CSV (pipe). When swapping from CSV to CSV (pipe), the "Edit as csv" ability disappears. Would it be possible to add a setting where we could add additional Language modes?

image

Add setting for line ending characters

When I am updating our current .txt files, they are using another line ending convention than you use. Not sure what it is or what is setting it, but I assume it is your tool generating the "newlines", since after I click "edit csv" it is already showing changes in the file. When I hit save, many of the rows are edited already, causing conflicts in our git repository since not everyone wants to use this tool (yet).

Is it possible to set the line ending characters in the settings? It seems like it is adding some character '^M' after our rows, not entirely sure what it is. For now I'll have to use your tool to update the files, t hen copy the lines over to our code, which is a bit tedious.

Add extension setting: file extension

Version

  • vs code plugin

Feature

I have csv files that do not have a .csv extension. It would be handy to have a configuration setting to add different file extensions.

Adopt VS Code's 'asWebviewUri' API

Hi, I maintain VS Code's Webview API

Issue

Our telemetry suggests that your extension uses webviews and may be loading resources in these webviews using hardcoded vscode-resource: URIs. These URIs have some important limitations and don't work properly when VS Code is run in a browser. We are also making changes in the desktop version of VS Code that may cause these URIs to not work properly in future versions of VS Code.

While we are making our best effort to continue support existing webview extensions that use vscode-resource: URIs on desktop versions of VS Code, we will not able to fully support all uses cases.

Fix

To ensure that your extension continues to work in as many environments as possible—including on web and remotely—please:

These APIs shipped around 2 years ago so they should be available in all modern versions of VS Code. You can find additional information about the issue here: microsoft/vscode#97962

Let me know if you have any questions about this change

Manual file reload

Hello, Great work with this project, I enjoy it, but what about if create a button for reload the file, inside of previewer?

Edit as csv option disappeared

Hello!

Since yesterday on vs-code insiders the option to "edit as csv" has disappeared from my user interface for certain csv files.

To create a simple example to show you, I made a new .csv file and noticed that with the new file, the option still shows up. See screenshot:
works

However, for my older .csv files, the option disappears. See screenshot:
gone

However, since I've created a keyboard shortcut to launch "edit as csv", I am still able to edit these files by using the keyboard shortcut. See the screenshot:
shortcut works

However, I do not want to rely on the keyboard shortcut. I would rather have the option to click the button as it used to appear for all my .csv files and as it still shows up in the first picture I show above.

Furthermore, I noticed that when I first create a .csv in VS-code Insiders, the "Rainbow CSV" seems to take no effect (see the first screenshot above). However, when I close and re-open the file, the color-coding shows up... But now "Edit as csv" has gone away! See screenshot:
gone too

It seems that there is a conflict between these two extensions, although i never noticed such a conflict before yesterday.

Any ideas how I need to fix this?

Calculate/Update stats only when it's visible

Version?

  • vs code plugin
  • browser

Feature

Currently the stats sidebar always calculates the stats, even when it's hidden.
For large tables this is a big performance hit, e.g. when you want to select a column...

It would be nice if the stats are only calculated if the side bar is open/visible.

Things to keep in mind:

  • first select cells then open the side bar, it should automatically calculate the stats without re-selecting

Unable to use vscode default shortcut to switch between editors

First of all, thanks for this extension!
I notice an issue with the navigation between editors if the current one is edit-csv.

Since Cmd+Opt+Left and Cmd+Opt+Right are used to select from the current position to the beginning and end of the current row I cannot switch among editors using those shortcuts if the current editor is edit-csv.

It seems that the shortcut for the row selection in this extension is not configurable and I would rather prefer to change the shortcut of changing the editor.

If the shortcut itself is not configurable in handsontable maybe it could be disabled by a configuration. Would that make sense?

How to keep the value model in a quotation mark ?

I have some files containing different type of data like so:

"foo";"1";0;"2019-10-30";;
"bar";"2";0;"2019-10-30";;

And I would like to be able to configure this editor to keep my quotes pattern.

Header is not display in the header line

What OS?

  • Windows

Version?

  • vs code plugin

Description

When the .csv file has the only header and no data rows, then the header is not displayed in the header row. When adding data row, the header is displayed properly.

Example:
csv-with-only-header

CSV file content:
SomeHeader;SomeHeader

Edit csv settings:
Csv-edit: Read Option_has Header: true
Csv-edit: Read Option_has Header: true
Csv-preview: Has Headers: true

Steps to reproduce

  1. Create CSV file with the only header
  2. Open CSV file in the extension
  3. Header is not visible in the "header line" but instead is displayed as data

Add Option to change the Column names to match like Excel

I am using your extension a lot to reconcile data between CSV files and Excel Worksheets.
It would be a really nice feature to have the ability to show the column numbers like in Excel with letters A-ZZZ instead of Column Numbers.

Is this something that you would be open to adding?

large file support

Hi, my files are e.g. 15MB large, they cannot be viewed. The view opens but it keeps black and Nothing happens.

To install the extension locally via git clone

Hello!

Building it locally does not help. I would like to install it locally via git clone for not breaking the symlinks in other workspaces if I keep updating the extension. Updating the extension will change the folder version, resulting in broken symlinks in other worksapces.

After edit and reopen, extension takes a long time to render table

I have a CSV file with about 8,500 rows. I can open the file no problem. If I make a modification (deleting a column, modify a cell), save the changes, close the extension window, and then open the file again (either through the command pallet or clicking 'Edit as csv'), it takes a long time for the extension to load the CSV.

Next to the 'Apply changes to file' it says 'Rendering table...'. When I deleted a column, saved, and reopened the file, it was 'Rendering table...' for close to an hour.

I did a similar process with a CSV file with about 5000 rows, and it opened right away after I saved the file.

I can provide any other information if needed.

Column filtering

Version?

VS Code plugin

Feature

I'd like to use column filtering. Lets assume that I have a log file with a LogLevel column. It'd be nice to filter by Error. A nice additional feature would be that the addon keeps the same row/column selected even when I remove the filter to be able to see the rows surrounding the row where I previously found the Error.

Example:

Row Timestamp LogLevel Message
1 2020-10-27 01:00 Information Some information
1..100 many skipped lines
101 2020-10-27 02:00 Error Some error
102 2020-10-27 02:01 Information Some information

Filtering by Error:

Row Timestamp LogLevel (filtered) Message
101 2020-10-27 02:00 Error Some error

Select row 101

Row Timestamp LogLevel (filtered) Message
101 2020-10-27 02:00 Error Some error

Remove filter:

Row Timestamp LogLevel Message
1 2020-10-27 01:00 Information Some information
1..100 many skipped lines
101 2020-10-27 02:00 Error Some error
102 2020-10-27 02:01 Information Some information

Row 101 should remain selected and still be visible (in view).

Additional thoughts

It seems that this functionality is already in the excel viewer plugin, so I guess that it's not super important, but it would be very convenient. as the excel doesn't show row numbers by default (except when explicitly enabled by the csv-preview.lineNumbers setting).

EDIT: Added additional thoughts
EDIT2: Updated information on the Excel Viewer line numbers

edit-csv broken UI on vscode insider

Bug description

Hello, I heavily rely on your extensions in daily work and very appreciate it.
Recently i turn to vscode insider version to use "Remote SSH" function
But on this version, edit-csv display an broken UI (as below) seems like failure of loading of CSS or js or whatelse
image
I search the github, someone encounters the same issue: Extension doesn't work with vscode-insider: Git Graph、Edit csv.. In that link the repo owner thinks it is caused by "fundamental change in how the JS & CSS are loaded (as they are stored on the remote system instead of the local machine)."

How to reproduce

Software version

  • local os: Windows_NT x64 10.0.17763
  • remote os: Ubuntu 16.04.1
  • vscode: 1.35.0-insider (system setup)
  • vscode extensions
    • Remote - SSH: 0.37.0
    • Edit csv: 0.0.11

Steps

  1. Install vscode insider and install Remote - SSH
  2. Open an ubuntu remote machine using Remote - SSH
  3. Install edit-csv, it will automatically installed on to the remote side
  4. Create a new csv file on the remote, and use edit csv to display it

Then u can see the what i encountered.

I believe the os version is not correlated, under other os version the bug may also be reproduced.

Notice

Sometimes on the first run after installation of insider, the edit-csv works well. But when u close and reopen the insider, the bug will emerge

Background Problem

With the August 2020 VScode update, the "edit as csv" view's background is now suddenly white. I backed my VScode version up to July 2020 and it turned it back to the default grey of the Default Dark+ theme.

image

The arrows point to what turned white. The text color stayed the same when the background was white in those places, which also made it difficult to read non-button/dropdown text.

Scrolling behaviour when Shift is pressed

Most editor views support scrolling up and down as a default mouse roller behaviour and additionally change that to horizontal scrolling when Shift is held. I've noticed that Edit csv's table view does not support that, at the same time horizontal scrolling with touchpad is possible. I would like to see this as a feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.