Giter VIP home page Giter VIP logo

cuda_csv_hilite's People

Contributors

alexey-t avatar dinkumoil avatar artem3213212 avatar olehl avatar

Stargazers

 avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

cuda_csv_hilite's Issues

Error with "Insert column" and empty columns

@OlehL
file

aa,bb,cc
aa,,cc
aa,bb,cc

каретка на колонке bb.
изза пустой колонки получается креш при Insert column righer (я переименовал команды).

Startup: total: 800ms, including plugins: 40ms
Python 3.6.8
Loading toolbar config
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/__init__.py", line 310, in rnew_col
    self.current_col_do('rnew')
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/__init__.py", line 243, in current_col_do
    _csv = parse_csv_line_as_dict(line, sep=option_separator)
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/csv_proc.py", line 64, in parse_csv_line_as_dict
    res[col][1] += 1
KeyError: 1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/__init__.py", line 310, in rnew_col
    self.current_col_do('rnew')
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/__init__.py", line 243, in current_col_do
    _csv = parse_csv_line_as_dict(line, sep=option_separator)
  File "/home/user/.config/cudatext/py/cuda_csv_hilite/csv_proc.py", line 64, in parse_csv_line_as_dict
    res[col][1] += 1
KeyError: 2

Please restore global plugin option "option_separator"

IMO removing global option option_separator was not a good idea. It requires setting a separator char everytime a CSV document is loaded. Additionally the setting is not remembered across different CudaText sessions.

I would like to suggest the following changes:

  1. Store CSV separator setting to session file and also to the file meta data that is used in case option ui_reopen_session is set to false.
  2. Restore plugin option option_separator.
  3. When loading a CSV file check if there exists some info concerning CSV separator for that file. If not, use the value of global plugin option option_separator.

Make CSV separator configurable via settings file

I would like to suggest an improvement to the plugin.

When I tried the plugin I've noticed that it always uses comma as CSV separators. It would be useful to have the ability to change that via the config file to e.g. semicolon.

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.