Is it possible to use vim to allow multiple people editing a single file?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to use vim to allow multiple people editing a single file?

Peng Yu
Hi, things like google drive allow multiple people to edit one
document at the same time. I am wondering if there is something in vim
that can help with this as well. Does anybody know? Thanks.

--
Regards,
Peng

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to use vim to allow multiple people editing a single file?

Justin M. Keyes
On Sun, Jan 17, 2016 at 2:08 PM, Peng Yu <[hidden email]> wrote:
> Hi, things like google drive allow multiple people to edit one
> document at the same time. I am wondering if there is something in vim
> that can help with this as well. Does anybody know? Thanks.

Are you aware of https://floobits.com/help/plugins/nvim ?

Justin M. Keyes

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to use vim to allow multiple people editing a single file?

Ben Fritz
In reply to this post by Peng Yu
On Sunday, January 17, 2016 at 1:09:03 PM UTC-6, Peng Yu wrote:
> Hi, things like google drive allow multiple people to edit one
> document at the same time. I am wondering if there is something in vim
> that can help with this as well. Does anybody know? Thanks.
>
> --
> Regards,
> Peng

There was a net proof-of-concept a while back that I *think* was developed into a functional plugin. I'm not sure whether it is still maintained, the last commit was a while ago:

https://github.com/FredKSchott/CoVim

Other ideas depending on your OS may include sharing a screen session, etc. as suggested here: http://superuser.com/questions/231892/vim-multiuser-editing

Good search terms to use for this feature would be "collaborative editing in Vim" or similar.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to use vim to allow multiple people editing a single file?

Justin M. Keyes


On Jan 18, 2016 11:10, "Ben Fritz" <[hidden email]> wrote:
>
> On Sunday, January 17, 2016 at 1:09:03 PM UTC-6, Peng Yu wrote:
> > Hi, things like google drive allow multiple people to edit one
> > document at the same time. I am wondering if there is something in vim
> > that can help with this as well. Does anybody know? Thanks.
> >
> > --
> > Regards,
> > Peng
>
> There was a net proof-of-concept a while back that I *think* was developed into a functional plugin. I'm not sure whether it is still maintained, the last commit was a while ago:
>
> https://github.com/FredKSchott/CoVim

CoVim, like floobits, is moving to Neovim:

https://github.com/FredKSchott/CoVim/issues/86

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

How to debug a vim plugin?

Peng Yu
In reply to this post by Peng Yu
Hi,

I am wondering how to debug a vim plugin (for example, the following
one) in an efficient way.

https://github.com/Clavelito/indent-sh.vim/blob/master/indent/sh.vim

The main difficulty that I see is that a vim plugin is different from
a typical program is that in a typical programming language one can
easily isolate a piece of code and insert print statements. But in a
vim plugin, since it causes some effects in the code shown in vim, I
am not sure how a print statement can help much.

Also, in a regular programming language, one can run a function with
different parameters, then check its behavior. But a vim plugin is
just a whole piece of code, it is not clear how to run a piece of code
in an isolated environment to inspect its behavior.

Does anybody have any tips on how to debugging vim plugins? Thanks.

--
Regards,
Peng

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a vim plugin?

Tony Mechelynck
On Mon, Dec 10, 2018 at 3:55 PM Peng Yu <[hidden email]> wrote:

>
> Hi,
>
> I am wondering how to debug a vim plugin (for example, the following
> one) in an efficient way.
>
> https://github.com/Clavelito/indent-sh.vim/blob/master/indent/sh.vim
>
> The main difficulty that I see is that a vim plugin is different from
> a typical program is that in a typical programming language one can
> easily isolate a piece of code and insert print statements. But in a
> vim plugin, since it causes some effects in the code shown in vim, I
> am not sure how a print statement can help much.
>
> Also, in a regular programming language, one can run a function with
> different parameters, then check its behavior. But a vim plugin is
> just a whole piece of code, it is not clear how to run a piece of code
> in an isolated environment to inspect its behavior.
>
> Does anybody have any tips on how to debugging vim plugins? Thanks.
>
> --
> Regards,
> Peng

Debugging Vim-script language is Dr. Chip's province; he even wrote a
script to help debug other scripts. You may already check if
http://www.drchip.org/astronaut/vim/#DECHO helps you, otherwise I'm
adding Dr. Chip as Cc in case he might have other helpful information
for you.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a vim plugin?

Luc Hermitte
In reply to this post by Peng Yu
Hi,

> I am wondering how to debug a vim plugin (for example, the following
> one) in an efficient way.
>
> [...]
>
> Does anybody have any tips on how to debugging vim plugins? Thanks.


In my lh-vim-lib [1] library plugin I provide two sets of tools
- log functions [2] that can fill the qf window with the log messages automatically -- other logging frameworks fail to automatically link to the line where the log is emitted
- assert functions [3] for doing some design by contract. They permit to fail fast in case of unexpected value detected / dump the current callstack / start the debugger

It also provides a function that decodes displayed callstacks on error [4]

I also use a unit test framework [5] for unit testing functions.

[1] https://github.com/LucHermitte/lh-vim-lib
[2] https://github.com/LucHermitte/lh-vim-lib/blob/master/doc/Log.md
[3] https://github.com/LucHermitte/lh-vim-lib/blob/master/doc/DbC.md
[4] https://github.com/LucHermitte/lh-vim-lib/blob/master/doc/Callstack.md#lhexceptionsay_what
[5] https://github.com/LucHermitte/vim-UT

HTH,

--
Luc Hermitte

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a vim plugin?

MarcWeber
In reply to this post by Peng Yu
https://github.com/MarcWeber/vim-git-wiki/blob/master/vim-online-wiki-source/topic/debugging-viml

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug a vim plugin?

Bram Moolenaar
In reply to this post by Peng Yu

Peng Yu wrote:

> I am wondering how to debug a vim plugin (for example, the following
> one) in an efficient way.
>
> https://github.com/Clavelito/indent-sh.vim/blob/master/indent/sh.vim
>
> The main difficulty that I see is that a vim plugin is different from
> a typical program is that in a typical programming language one can
> easily isolate a piece of code and insert print statements. But in a
> vim plugin, since it causes some effects in the code shown in vim, I
> am not sure how a print statement can help much.
>
> Also, in a regular programming language, one can run a function with
> different parameters, then check its behavior. But a vim plugin is
> just a whole piece of code, it is not clear how to run a piece of code
> in an isolated environment to inspect its behavior.
>
> Does anybody have any tips on how to debugging vim plugins? Thanks.

Besides what's already said, if you just want a simple way to log some
text, you can use the mechanism for channels:

        ch_logfile('SomeFileName', 'w')
        ch_log('This happened')

Messages are written to a log, thus this also works for things like
autocomplete.  It will include time stamps, which are often useful.

--
An easy way to determine if you have enough teamwork to be doomed is simply to
measure how long it takes from the time you decide to go to lunch together
until the time you actually eat.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.