GithubHelp home page GithubHelp logo

sublimetableeditor's People

Contributors

idpaterson avatar ltiao avatar vkocubinsky 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublimetableeditor's Issues

table_editor_film keybind causing issues.

Hey there, love your plugin, but I've had to make a change to one of the keybinds:

{ "keys": ["ctrl+x", "ctrl+t"], "command": "table_editor_film" },

Since that keybind combo starts with ctrl-x, it hangs up the default keybind for cut. Pressing ctrl+x twice will still cut text, but I think it would make more sense to use a combo of ctrl+k, ctrl+t since most other keybind combos start with ctrl+k.

I've made that change for myself, but just wanted to let you know... thanks!

Sort by current column

Not a core feature but a "nice to have" would be a basic sort. So in the table

    |    Name   |   Phone   | Age |             Position             |
    |-----------|-----------|-----|----------------------------------|
    | Anna      | 123456789 |  32 | Senior Software Engineer         |
    |-----------|-----------|-----|----------------------------------|
    | Alexander | 987654321 |  28 | Senior Software Testing Engineer |
    |-----------|-----------|-----|----------------------------------|

I could press a key combo and the rows would be ordered by the values of that column.

CSV region into table

IMHO this option should be a command palette option rather than a keybinding.

ctrl+k, |

Convert selected CSV region into table

Convert CVS into table

Use Case:

  • copy CSV data, for example from SQL tool
  • paste into sublime editor
  • select all or subset CSV lines
  • click ctrl+k, |

Expected Result: selected CSV lines will convert into Table lines.

Move table manipulation functionality from table_plugin to tablelib

Currently table_plugin is responsible for delete column, swap columns, delete row, swap rows, insert separator, insert double separator, join lines, split lines.

This issue is about move this functionality into tablelib for more clear component responsibility, table_plugin primary responsible for get command from user and delegate command to tablelib

table = tablelib.TextTable(text, self.syntax)
table.swap_columns(1,2)
text = table.render()

Textile rowspan formatting improvement

Currently, a rowspan entered like this

|/2. A | B |

is formatted like this

|/2. A | B |
|      |

That representation is not quite accurate since the syntax means that the A column extends two rows. A more semantic presentation of a rowspan would be something like this where the second row is aligned under the B column.

|/2. A | B |
       |   |

In other cases where the rowspan is between two columns it is less clear what is the right thing to do. Currently a three-column table with a rowspan on the second column is formatted like this

| A |/2. B | C |
|   |      |

There is no great way to represent that in Textile, but this could work

| A |/2. B | C |
|          |   |

Here we align the columns on their left edges, so A is as wide as it needs to be to allow C to be aligned. Not sure if some of the colspan logic can come into play here for the sake of rendering but it looks possible.

This is not a severe issue since either way Textile still generates the correct table. Just a question of whether it is possible to keep the other columns aligned. Great work so far, this plugin is extremely helpful!

Grid Tables

I'd like to create a Pandoc Grid Table with lists in cells. I have the following user settings:

"table_editor_syntax": "Pandoc",
"table_editor_border_style": "grid",
"table_editor_keep_space_left": true,

Can you give me a sense of how Table Editor should behave differently with these user settings versus the default settings? An example would be awesome. Thanks.

Empty columns removed after formatting one-row table

This only affects one-row tables and is easier to show with an example. Considering Textile syntax, the following would specify a table with 3 empty columns

| | | |

However, after formatting (Tab, Enter, etc) this becomes

|   |
|   |

To further characterize the behavior, any cells to the right of the last cell with data are truncated as shown below.

| A | B | C | | | | |
| A | B | C |
|   |   |   |

This only applies to cells with data; cells with just Textile formatting are removed.

|_. A |_. B |_. C |_. |_. |_. |_. |
|_. A |_. B |_. C |
|     |     |     |

Finally, this only seems to affect one-row tables. The following two-row table is handled properly.

| | | |
| | | |
|   |   |   |
|   |   |   |

Workflow issues adding colspan to existing table

In the dev branch, I am able to use colspan syntax in Textile, which is a great addition to SublimeTableEditor. However, actually using the feature brings up a few minor workflow issues.

Adding colspan syntax to an empty row pushes new columns; expected behavior is probably to "consume" empty cells.

After entering a header row I press Tab to insert a new row. My editor looks like this:

|_. Attribute Name |_. Required |_. Value Type |
|                  |            |              |

I decide that I want a row spanning all 3 columns, so I type

|_. Attribute Name |_. Required |_. Value Type |
| \3. All Events                 |            |              |

After pressing Tab, my expectation is the following

|_. Attribute Name |_. Required |_. Value Type |
|\3. All Events                                |
|                  |            |              |

However, the current behavior interprets the remaining cells in addition to the spanned cell, adding to each row.

|_. Attribute Name |_. Required |_. Value Type |   |   |
|\3. All Events                                |   |   |

The workaround for this is to manually remove the additional separators from the colspan line before causing the table to be reinterpreted, but it would be nice to not have to do that. I think that the expectation would be different if the cells are not empty, so this could be a bit tricky.

Considering a more complicated table, it will not always be easy to notice that rows were added at the end or to manually remove the proper number of separators. This would certainly be a nice-to-have improvement.

When i enable for current view it doesn't work

Hello,

I have an already existing document and when i enable table editor the tab doesn't jump from column to column

And i have error logs in the console

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 178, in run
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 186, in run_one_sel
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 173, in create_context
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 132, in detect_syntax
  File "table_lib in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 85, in create_syntax
ValueError: Syntax Auto doesn't supported
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 178, in run
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 186, in run_one_sel
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 173, in create_context
  File "table_plugin in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 132, in detect_syntax
  File "table_lib in /Users/yecine/Library/Application Support/Sublime Text 3/Installed Packages/Table Editor.sublime-package", line 85, in create_syntax
ValueError: Syntax Auto doesn't supported

here is what i have in my settings for markdown files

{
    "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
    "enable_table_editor": true,
    "extensions":
    [
        "mdown",
        "txt",
        "md"
    ],
    "tab_size": 2,
    "table_editor_syntax": "Auto"
}

Add support for reStructuredText code syntax

would it be possible at an indentation to keep the spaces left? I work with rst format and I would like to add code in a column of a table and to reformat the table with your plugin. (with the key tab)

Actual

+--------------------------------------------+
|                widget code                 | 
+============================================+
| .. code-block::javascript                  |
|                                            | 
|    widget.dispatchEvent('onSetTags', object); |
+--------------------------------------------+

Needed : press in tab key (the left spaces have to stay)

+-----------------------------------------------+
|                widget code                    | 
+===============================================+
| .. code-block::javascript                     |
|                                               | 
|    widget.dispatchEvent('onSetTags', object); |
+-----------------------------------------------+

Thanks in advance

What is «Auto align number column to right»?

Hello, I don't understand how functions «Auto align number column to right». I add in my .sublime-settings file line "table_editor_align_number_right": true, but numbers not align to right.

  1. If hlines are absent, numbers remain in the same position where I wrote them.

Without hlines

2. If hlines is, numbers are aligned to the center, but not to the right.

With hlines

All options except this correctly work for me. @vkocubinsky, would you add illustrations to be able to understand the functioning of this option?

Environment

  • Operating system and version:
    • Windows 10 Education
  • Sublime Text:
    • Build 3114

Thanks.

Shortcuts using `ALT` and arrow keys conflict with Mac standard text navigation

ALT + left/right are move by word. ALT + SHIFT + left/right are select by word. ALT + SHIFT + up/down are select by paragraph.

These are default, system-wide text navigation shortcuts, and overriding them in a text editor is a source of much frustration.

SublimeTableEditor assigns these to row/column manipulation.

I'd suggest CTRL + ALT and CTRL + ALT + SHIFT instead.

Conversion to LaTeX table

It would be great if there would be a way how to convert the final table into LaTeX by a single command. Thx for the plugin. 👍

Long table editing

Currently, if the table is long enough to not fit on one screen, pressing <tab> results in text buffer scroll being reset. That is, when I edit a cell at the end of a two-screen table, then press <tab>, I don't see the cell I've just edited anymore, but rather the top rows of the table. The cursor remains where it ought to be, though.

Textile support

What do you mean by Textile support? Most basic table isn't working properly.

|_. header1  |_. header2 |
| x  | y |

Result

| _. header1  | _. header2 |
| x           | y          |

and it's wrong, because of a space before "_.". With that space it's not recognized as a header anymore.

I won't mention more advanced tables:

|_. h1    |_. h2 |
|/2. row | x      |
| y |

and it Tables Editor will generate

| _. h1    | _. h2 |
|/2. row   | x     |
|          | y     |

what is completely different from what you expect. You can check the code below in http://borgar.github.com/textile-js/

h1. Input

|_. h1|_. h2|
|/2. row|x|
|y|

h1. Tables editor output after TAB

| _. h1   | _. h2 |
|/2. row  | x     |
|         | y     |

Add support for reStructuredText substitution syntax

reStructuredText has support for user-defined substition (http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions).
Here is example of usage:

.. |varname| replace:: content

+---------------------+-----------+
|          A          |     B     |
+=====================+===========+
| varname = |varname| | value 1.2 |
+---------------------+-----------+
| value 2.1           | value 2.2 |
+---------------------+-----------+

Buf reformatting (Ctrl+Shift+A) completely breaks table layout:

+-----------+-----------+---+-----------+
|     A     |     B     |   |           |
+===========+===========+===+===========+
| varname = | varname   |   | value 1.2 |
+-----------+-----------+---+-----------+
| value 2.1 | value 2.2 |   |           |
+-----------+-----------+---+-----------+

It would be nice to have support for such tables.

Disable automatic separator row for MultiMarkDown syntax.

It would be useful to allow to disable the automatic creation of a separator row


| ------------ | ------------- | ------------ |

and allow either the creation of empty cell rows by changing a default setting


|              |               |              |

The reason for this is that MultiMarkDown tables don't allow multiple separator rows. In addition in the current syntax it is possible to add a single empty line between rows which will create a new section (a new tbody) in the table, which can be useful for formatting. I have submitted a request to allow alternate markup options for new sections such as by using empty cell rows instead of a single empty line.

Make an atom version?

This is probably one of the few packages that I can't find a decent replacement for in Atom, and I miss it terribly.

If you could come out with an Atom equivalent of this package, that would be awesome. I'd be willing to help out where I can, although my CoffeeScript skills aren't particularly robust.

Table Editor not working if line is starting with *

I noticed that TableEditor is not working if line is starting with _; as this is the normal behaviour in C comments, I'd like to use TableEditor in that case as well
For instance (on the _same* view):

* | a | b | c |
* |-<Tab>

TableEditor is not triggered. Instead, on:

| a | b | c |
|-<Tab>

TableEditor is correctly triggered and working

Custom font for table region?

I typically like to edit markdown in a variable width font, though this doesn't work for tables. Would it be possible that one could specify a preferred mono-space font for the table region?

Allow setting table syntax for current syntax

It would be good to set the table syntax as the default for a given syntax. Right now for instance, if I reopen a MultiMarkdown file the default table syntax will not be "MultiMarkdown" so I have to make the change each time for each view.

Split cell syntax contents generating table cells

When I compile my markdown following your instruction to split a cell:

| sadasd |       das       |
| ------ | --------------- |
| sdad   | Senior Software |
|        | Engineer        |
| ------ | --------------- |
| sdasd  | sfafsf          |
| asdasd | dsdfsdf         |

I get this result:
screenshot 2013-12-26 19 59 59

Any idea of what might be causing it?

Im compiling the markdown using Assemble

Pressing tab after `+`

Pressing tab after + character trigger the keybinding as defined here and here.

However this becomes a bug when writing markdown. + is a list bullet for markdown and whenever I press tab after +, the plugin unintentionally triggers.

Should I fix this via local overriding or is it a common bug that needs to be fixed in some way?

chinese character (utf-8) width calculate bug

Table contain chinese character (utf-8) massed up.

english is ok:

1.1 1.2 1.3 1.4
2.1 2.2 2.3 2.4
----- ----- ----- -----
3.1 3.2 3.3 3.4

chinese massed up:

1.1汉字 1.2中文 1.3 中文 1.4
2.1 中文2.2 2.3 2.4
--------- --------- ---------- -----
3.1 3.2 3.3中文 3.4

Mediawiki tables

Hi! Perfect plugin!
I want to integrate my plugin Mediawiker with TableEditor. I wrote a message to you on sublime forum about this. Please check it.

Convert table to CSV?

Love this extension, any chance you could implement the reverse? Would be a perfect way to get data into CSV format without having to fire up the E word.

Provide predefined table styles for some wiki syntax

The goal is to have predefined table styles configuration for some wiki syntax:

  • Emacs
  • Pandoc
  • MultiMarkdown
  • Textiles
  • ReStructuredText
  • Simple

User be able select configuration with edit preference file

{
    //List of values for this parameter:
    // Emacs, Pandoc, , MutliMarkdown, Textiles,reStructuredText
    "table_editor_wiki_style": "Simple"
}

User be able override some features of wiki style. It is usefull when user work in plain text and like to configure some features that a bit different from predefined wiki styles.

    //List of values for this parameter:
    // Emacs, Pandoc, , MutliMarkdown, Textiles,reStructuredText
    "table_editor_wiki_style": "Simple"
    //"table_editor_custom_alignment": false ,
    //"table_editor_multimarkdown_alignment": false
   //List of values for this parameter: emacs, grid, simple
   // "table_editor_border_style": "grid"

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.