[Feature Request] New Command: Select Markdown Table
Closed this issue · 17 comments
**Is your feature request related to a problem? Please describe. **
Since the starting point to edit tables is to make a selection of the markdown table in the note, I think would be amazing if we have a new command that selects a table based on the position of the caret cursors.
Describe the solution you'd like
If the caret cursor is placed inside a markdown table, hitting the new command will select the entire table !
Thanks for reading this!
Have a great day!!!!
@FelipeRearden , does this work?
Binding it to the same command. Logic used
if there is a selection
user selected text is used as input
else
explore on either side of the cursor for empty line
all the lines between this will be used as input
@FelipeRearden , does this work?
Binding it to the same command. Logic used
Forgive for my comment @ganesshkumar , let me share why I think we need to select the table as well.
Following your video, after entering in the md table editor window the next steps for the user are:
- Step 1: Hit copy to markdown button;
- Step 2: Set the focus to the previous note;
- Step 3: Paste the new table to overwrite the previous table (update).
This way, if we already have the table selected, I don't need to manually select the table than hit CRTL+V :)
Let me know what you think :)
Have a great day !!!!
Oh, got it. That can be a separate command 👍
Thank you very much @ganesshkumar !!!!!!
Thats exactly what I have in mind !!!!!! 💙 💙 💙
Happy to help :) Thank you for the valuable feature suggestions!
Happy to help :) Thank you for the valuable feature suggestions!
Thank you very much @ganesshkumar !!!!!!!!!!!!!!!
I already installed version 0.1.1 and I think I found a bug ....
Take a look at the images ... when selecting a table with the new command, the line before the first row is being selected two
With or without content
Fun Fact -> sometimes is working prefect .... :)
I was trying to investigate if is something related to the caret cursor position when I am hitting the command ...
But I did not found a pattern to share with you :)
I hope you can reproduce this on your end 🙏
Damn! Some regression happened. I should add some tests before adding more functionality!
I checked for the same from my end.
- When you put your cursor on the first line of the table (header) and invoke the function, do you see extra selection on top line?
- Similarly, when you put your cursor on the last line of the table and invoke the function, do you see extra selection on bottom line?
@FelipeRearden Can you update it once again? 0.1.2 - I have included some fixes for both the issues. Works for my, let's see if it fixes the issues for you as well.
@FelipeRearden Can you update it once again? 0.1.2 - I have included some fixes for both the issues. Works for my, let's see if it fixes the issues for you as well.
Sure !!!! I'm here :)
Just to let you know about version 0.1.2
the manifest.json from this release is version 0.1.1
. This way I can't see an update button on Obsidian.
Just to check with you if I can change manually the manifest.json from the 0.1.2 release and start my test updating manually ?
- When you put your cursor on the first line of the table (header) and invoke the function, do you see extra selection on top line?
Working perfect on version 0.1.2
!!!!! Thank you very much @ganesshkumar for your help !!!!!!
- Similarly, when you put your cursor on the last line of the table and invoke the function, do you see extra selection on bottom line?
Working perfect on version 0.1.2
!!!!! Thank you very much @ganesshkumar for your help !!!!!!
Let me just add one little information to see if you want make some changes or not ...
When we have some text in the line AFTER the last line of the table, we have a little issue. Take a look ...
If the line is empty 100% clear!
I'm pointing this to you because it's very common to use some tag like small
after the table to add some explanation about the table like a footnote
For me it's okay on version 0.1.2
but as a tester, I think is my duty to present to you all my findings :)
Thanks for the quick reply :)
Hello @ganesshkumar !!!!
Sorry to bother you :)
One more information about selecting a table when you have content in the next line of the table ... #8 (comment)
The amazing plugin Obsidian Charts has a new feature that let´s you create Charts from Tables !!!!!
If you look at he documentation, you will see that it uses a table-id
in the next line after the table
This way, would be amazing if we avoid this line when selecting a markdown table 🙏
Thanks for reading this and have a great day!!!!!!!!!
With v0.2.2, this is fixed
Hello @ganesshkumar !!!!
Thank you very much for the fix 💙
Working perfect on version 0.2.2
Obsidian 0.14.6
and Obsidian Mobile
One ask :)
When you have some time, would you mind taking a look at these two issue 🙏
Thank you very much and have a great day 🌞
Sure @FelipeRearden, I have triaged the feature requests. Will implement them soon!