vkocubinsky / sublimetableeditor Goto Github PK
View Code? Open in Web Editor NEWThis package is no more supported. I moved to vim.
License: Other
This package is no more supported. I moved to vim.
License: Other
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!
It will be nice to have some per cell alignment syntax. Subset from Textile aligment syntax looks simple and looks as good choice:
. align left
See tables section here http://redcloth.org/hobix.com/textile/
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.
IMHO this option should be a command palette option rather than a keybinding.
ctrl+k, |
Convert selected CSV region into table
Use Case:
Expected Result: selected CSV lines will convert into Table lines.
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()
I use demon386/SmartMarkdown as it supports pandoc/markdown tables, but I envy the power (move/join/split columns and row) of vkocubinsky/SublimeTableEditor. Could demon386 make use of vkocubinsky, or vkocubinsky support pandoc style tables? What happens if one has them loaded at the same time?
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!
The reason is command menu erases setting "enable_table_editor", but if syntax specific setting has "enable_table_editor"=true view.settings().get("enable_table_editor") is still true. Fix is instead of erase setting use set to false.
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.
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.
| | | |
| | | |
| | | |
| | | |
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.
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"
}
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
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.
2. If hlines is, numbers are aligned to the center, but not to the right.
All options except this correctly work for me. @vkocubinsky, would you add illustrations to be able to understand the functioning of this option?
Thanks.
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.
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. 👍
It would be great if this plugin could support the features of MultiMarkdown tables. Most notable being able to combine multiple columns to create ultra wide rows.
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.
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 |
Hello,
I followed the instructions to install Table Editor on ST3 but the only available option in command + shift + p is "Table editor show demo film in new scratch view". In ST2 there are a lot more options.
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.
Provide message when user install Table Editor. Package Control allow do this with messages.json
Hi,
I can't get the shortcut for for 'Convert selected CSV region into table'
ctrl+k, |
to work on OSX 10.9.2. It works just fine on Windows 8.1. I did get the conversion to work by creating a command palette, as explained here
#34
Thanks for creating the package
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.
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.
Does this support the merging of cells in reStructuredText tables? Every time I press tab, the cells I merge (by deleting the extra |) are made separate again.
This issue is followup on Mediawiki tables . The goal is provide easy way to add additional table syntax for example mediawiki tables or confluence tables.
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
Trying to generate a Table from CSV data containing german umlauts (ä, ö, ü) won't work (at least with Sublime Text 2 on Windows 7).
Example:
A;B;C;D
2Ä;2B;3C;4D
Now '+' character recognized as a table it make a problem in markdown mode where character '+' uses as list marker.
The supposed pandoc/grid type does not correspond to any of the actual pandoc table types: simple, multiline, or grid. If the given in the example is run through pandoc, Anna and Alexander would be in the same cell, as would 20 and 27. Simple types have no vertical bars and grids require a line to seperate rows.
I miss this plugin in Sublime Text 3. Any plans to port it?
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?
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.
In this example:
| A || B |
| A | B | C |
the top right border is not aligned.
When I compile my markdown following your instruction to split a cell:
| sadasd | das |
| ------ | --------------- |
| sdad | Senior Software |
| | Engineer |
| ------ | --------------- |
| sdasd | sfafsf |
| asdasd | dsdfsdf |
Any idea of what might be causing it?
Im compiling the markdown using Assemble
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?
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 |
After [ctrl+k, enter] or [ctrk+k -] cursor not have not correct position. Expecte position is end of field, but actual position is position before run command
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.
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.
The goal is to have predefined table styles configuration for some wiki syntax:
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"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.