Comments (21)
Thanks for the information. This is similar to Caret I mentioned before
Caret is a good Markdown editor. It
- creates tables on Enter based on header
| abc | abc |
- creates table rows on Enter
- [added] goes to next cell on Tab
- resizes table columns on typing/Tab
These are completely doable although also require much effort.
from vscode-markdown.
In case this feature is still being considered, Atom has an amazing package that is very intuitive to use: https://atom.io/packages/markdown-table-editor.
Shotcuts like tab
to jump to a next cell are really useful.
from vscode-markdown.
Let me do some investigations on how other Markdown editors do this
from vscode-markdown.
Caret cannot do that.
Typora has a custom control to change table size and alignment. But it is hard to bring that to vscode.
from vscode-markdown.
OK, I understand now. (I thought you meaned to paste Markdown table directly from Excel data)
I opened another issue for it. You can use Markdown Shortcuts as a complement before that feature is added.
from vscode-markdown.
This extension kind of does the job : https://marketplace.visualstudio.com/items?itemName=JayFiDev.tablegenerator&ssr=false#review-details
from vscode-markdown.
Thanks for your suggestion.
It is a good feature. But I would like to think more about the UX. Right clicking to add row/column is kind of... "strange"
from vscode-markdown.
What about Shortcut keys? But I would prefer Right Click because it is more visible to users.
Will VS code API allows you to make a ToolBar?
from vscode-markdown.
vscode API provides very limited support for these customizations. That is why I am hesitant.
from vscode-markdown.
New Method. When the user places the cursor in a specific cell
- Pressing Double Enter creates new Row
- Pressing Double Tab creates new Column
- Pressing Ctrl + Double Enter Deletes current Row
- Pressing Ctrl + Double Tab Deletes current Column
from vscode-markdown.
I'm afraid that we cannot easily detect double enter/tab event… (how do we do when we find the enter key is pressed once? Breaking line immediately? Or waiting for another pressing?)
Thanks again for your suggestion.
And before I find a good way, you can add some simple shortcuts for workaround.
from vscode-markdown.
Then use
- Ctrl + Enter(Tab) for Create
- Shift + Enter(Tab) for Delete
from vscode-markdown.
Caret is a good Markdown editor. It
- creates tables on Enter based on header
| abc | abc |
- creates table rows on Enter
- resizes table columns on typing
from vscode-markdown.
Creating columns?
from vscode-markdown.
What about adding an additional column in header automatically creates a new column in the whole table?
Also, Alignment will be a good addition.
from vscode-markdown.
I agree that adding table body as typing table header is a natural way.
But some tricks are needed to implement this (because of vscode API). So at this time I'm not motivated to do it 😓.
As for the alignment, choose :---
, ---:
and :---:
in the second line.
from vscode-markdown.
I think you can use CodeLens and CodeAction to provide these actions.
Put the cursor in a cell, then the CodeLens provides align left
, align center
, align right
, insert column left
, insert column right
commands, while the CodeAction provides insert row above
and insert row below
commands.
from vscode-markdown.
Of course you can do that. But the problem is it will add too many "buttons" in the UI making it looks bad.
from vscode-markdown.
@neilsustc Is it possible to add Convert tabular data to tables feature? So that I can easily copy Excel data into a Markdown table.
from vscode-markdown.
Accessing clipboard is a big problem. More info here
The VSCode API doesn't provide methods to access the clipboard. There are several open issues regarding this issue (217, 4972, lots of duplicates), but it doesn't look like Microsoft has plans to implement an API for the clipboard. This could be an issue as there are several issues noted by users with the workaround libraries recommended by the VSCode team.
from vscode-markdown.
@neilsustc Maybe you can check this out: Markdown Shortcuts. It do have a Convert tabular data to tables feature in it.
from vscode-markdown.
Related Issues (20)
- markdown.extension.print.onFileSave: false is ignored
- "Toggle strikethrough" command doesn't recognize lists
- `tab` to indent the whole `<li>` list item block.
- Slowness in typing HOT 2
- Causes scm.experimental.showHistoryGraph to not show file diffs HOT 1
- Unordered list marker completion after multi-line list element
- Clicking on the markdown links, if they are valid, should open local files in the IDE and folders in the local operating system's file manager.
- Code Blocks Without Language Not Formatted in Markdown Files HOT 2
- feature to create a list of data into table format
- Cursor jumps to next line while writing in markdown file HOT 1
- Add Work in Progress Checkbox HOT 2
- extension slows down inputting comments in a jsonc file HOT 1
- Ctrl+B inside markdown document does trigger other VS functionality
- Extension causes high cpu load
- Consider single-pane workflow
- Wrong letter for İ when generating TOC.
- highlights all words in red
- fixed and floating toc in editing mode
- Chinese text with :[ does not align properly HOT 1
- Can't do enter or backspace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-markdown.