jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.13k stars 268 forks source link

Use vim-table-mode for vim-orgmode table feature. #159

Open dkinzer opened 10 years ago

dkinzer commented 10 years ago

dhruvasagar/vim-table-mode is a feature rich ascii table manipulator that seems to only be lacking a sorting feature and an export feature. At a glance, the code base seems pretty solid (though, it's vimscript not python); but the test suite looks very comprehensive.

I think incorporating this module into vim-orgmode could be very beneficial.

sotte commented 10 years ago

I use https://github.com/godlygeek/tabular for my tables. It's not integrated in vim-orgmode and not as feature rich as Emacs' orgmode table thingy but all I have to do is :Tabular /| to align a table.

vim-table-mode looks pretty powerful though! Quite a few third-party plugins are integrated into vim-orgmode: utl, speeddating, tag-bar, etc. Maybe such an approach to integrate vim-table-mode would be sufficient. I don't have the time to do that but pull requests are welcome.

dkinzer commented 10 years ago

Got it. I think the vim-table-mode either uses tabular or was heavily influenced by tabular at least that's my impression from an issue I read. Any specific requirements you look for when integrating a third party?

sotte commented 10 years ago

I think we should not define new orgmode specific mappings but reuse the vim-table-mode mappings.

What do you think?

dkinzer commented 10 years ago

Agreed. I'll see if I can put this together.

sotte commented 10 years ago

:+1: :)

sotte commented 10 years ago

@dkinzer any news? I'm using table-mode (without any modifications) and it works quite nicely.

dkinzer commented 10 years ago

Sorry Stefan, I haven't had any time to work on this, but like you say the only thing to do is to add documentation because it works pretty fine out of the box.

On Sun, Apr 20, 2014 at 6:52 AM, Stefan Otte notifications@github.comwrote:

@dkinzer https://github.com/dkinzer any news? I'm using table-mode (without any modifications) and it works quite nicely.

— Reply to this email directly or view it on GitHubhttps://github.com/jceb/vim-orgmode/issues/159#issuecomment-40892431 .

sotte commented 10 years ago

Hey David,

I'll do some more testing and add the documentation then.

Thanks for opening the issue!

On Sun, Apr 20, 2014 at 9:48 PM, David Kinzer notifications@github.comwrote:

Sorry Stefan, I haven't had any time to work on this, but like you say the only thing to do is to add documentation because it works pretty fine out of the box.

On Sun, Apr 20, 2014 at 6:52 AM, Stefan Otte notifications@github.comwrote:

@dkinzer https://github.com/dkinzer any news? I'm using table-mode (without any modifications) and it works quite nicely.

— Reply to this email directly or view it on GitHub< https://github.com/jceb/vim-orgmode/issues/159#issuecomment-40892431> .

— Reply to this email directly or view it on GitHubhttps://github.com/jceb/vim-orgmode/issues/159#issuecomment-40903208 .

dkinzer commented 10 years ago

OK, sorry I had started https://github.com/dkinzer/vim-orgmode/compare/vim-table-mode but then got bogged down with other stuff.

sotte commented 10 years ago

Don't be sorry! If you want to add this feature I'm more than happy. There is no rush. Just let me know.

Shurakai commented 9 years ago

@dkinzer @sotte What exactly is left here to do?

I just tried to use it and it seems to work quite nicely; I'm a bit confused though, as in the documentation (section "Creating table on-the-fly") each row seems to be separated by some filling row.

This does not seem to be the case for org-mode (see http://orgmode.org/manual/Built_002din-table-editor.html#Built_002din-table-editor) and we might have to set the option accordingly, see the

call s:SetGlobalOptDefault('table_mode_fillchar', '-')

at https://github.com/dhruvasagar/vim-table-mode/blob/master/plugin/table-mode.vim

sotte commented 9 years ago

@Shurakai the table feature of emacs' orgmode is really a beast. It can do so many things: Tab to jump to the next cell, auto format on every Tab, do math on the cells (replace Excel), fill cells with previously defined data, etc.

So I guess there is a lot left to do :)

But if "just" want to integrate vim-table-mode, we should create a pull request and talk about the details.

Shurakai commented 9 years ago

Yeah I think we should just go ahead with a PR. There are many other parts of vim-orgmode that require attention and vim-table-mode is quite sophisticated.

We need to add documentation for sure, but what else? It worked quite well already.

sotte commented 9 years ago

Documentation, tests... And the plugin should be optional, i.e., nothing breaks if vim-table-mode is not installed.

jalcine commented 8 years ago

Curious to know if a PR's been crafted; I'm willing to test drive against a few cases of live data (or write tests for said examples).

doak commented 4 years ago

@dkinzer, why was this issue closed? Although no code is there, the comments here seem to be a good blueprint to put things together. And closed means either "not valid" or "done", imho neither is correct.

@Shurakai, did you managed to implement something?

0xACE commented 4 years ago

159

Not sure about MIT vs GPL licensing and what functionality you want... but vimwikis implementation automatically aligns the table whenever you exit insertmode or tab to the next cell...

Let me know and I'll submit my PR mid september.

farao commented 3 years ago

Let me know and I'll submit my PR mid september.

This would be very helpful for me! Since I did not see a merged or open PR about this: can I find the code somewhere or would you provide this as a PR @0xACE ? :-)