Re: vim plugin is not working for me

89 views
Skip to first unread message

Edward K. Ream

unread,
Sep 18, 2012, 10:11:46 AM9/18/12
to leo-e...@googlegroups.com
On Sun, Sep 16, 2012 at 3:27 PM, Joon Ro <joon...@gmail.com> wrote:
> Hi,
>
> I have been aware of leo for quite a while, but finally I started using it
> seriously.
>
> Anyway, I have copied @settings node from the basic settings file to
> ~/.leo/myLeoSettings.leo, and uncommented vim.py in @enabled-plugins. I
> restarted Leo and I see vim in Plugin Menu.

Besides enabling the vim plugin, be sure to copy the following
settings to your myLeoSettings.leo:

@string vim_cmd = c:\vim\vim72\gvim --servername LEO

@string vim_exe = c:\vim\vim72\gvim

Change these as required for your Linux system, then restart Leo.

HTH.

Edward

Joon Ro

unread,
Sep 18, 2012, 8:05:31 PM9/18/12
to leo-e...@googlegroups.com
Thanks for the reply. So in myLeoSettings.leo, I have

@settings
Plugins
+vim plugin
+@string vim_cmd = /usr/bin/gvim --servername LEO
+@string vim_exe = /usr/bin/gvim

and I restarted leo, but still when I double click on the icon (the square before the node heading), it goes to the node heading editing mode.

Best,
Joon

F.S.

unread,
Sep 26, 2012, 9:32:03 PM9/26/12
to leo-e...@googlegroups.com

This does not apply to Linux but on Windows if your installation path has space, you need to quote the executable string. The following would work:
@string vim_cmd = "c:\Program Files (x86)\Vim\vim73\gvim" --servername LEO
@string vim_exe = "c:\Program Files (x86)\Vim\vim73\gvim"

The example given in leoSettings would not work as it does not quote the path.

F.S.

unread,
Sep 26, 2012, 9:34:32 PM9/26/12
to leo-e...@googlegroups.com
I don't think there is a key or mouse binding for vim now. You need to alt-x vim-open-node.
Also make sure that vim,py is turned on in @enabled-plugins. You should see it listed in the plugins menu.

Joon Ro

unread,
Sep 27, 2012, 12:57:48 PM9/27/12
to leo-e...@googlegroups.com
Thanks for the reply. alt-x vim-open-node DOES work, but other things do not. 
vim,py is turned on in @enabled-plugins. Leo goes to heading editing mode when I double click on the node icons.

I wonder if there is any linux user who could do this? It would be great if they can give me a pointer.

Best,
Joon

Kent Tenney

unread,
Sep 27, 2012, 1:12:30 PM9/27/12
to leo-e...@googlegroups.com
On Thu, Sep 27, 2012 at 11:57 AM, Joon Ro <joon...@gmail.com> wrote:
> Thanks for the reply. alt-x vim-open-node DOES work, but other things do
> not.
> vim,py is turned on in @enabled-plugins. Leo goes to heading editing mode
> when I double click on the node icons.
>
> I wonder if there is any linux user who could do this? It would be great if
> they can give me a pointer.

I can't help other than confirm I have the same problem.
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/leo-editor/-/hSQaxE_A9YkJ.
>
> To post to this group, send email to leo-e...@googlegroups.com.
> To unsubscribe from this group, send email to
> leo-editor+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/leo-editor?hl=en.

Edward K. Ream

unread,
Oct 2, 2012, 3:13:40 PM10/2/12
to leo-e...@googlegroups.com
On Thu, Sep 27, 2012 at 12:12 PM, Kent Tenney <kte...@gmail.com> wrote:
> On Thu, Sep 27, 2012 at 11:57 AM, Joon Ro <joon...@gmail.com> wrote:
>> Thanks for the reply. alt-x vim-open-node DOES work, but other things do not. vim,py is turned on in @enabled-plugins. Leo goes to heading editing mode when I double click on the node icons.

> I can't help other than confirm I have the same problem.

The "fix" is on the trunk at rev 5477. It is only a change to the
docstring for vim.py. This is the documentation you see when choosing
Plugins::Vim.

I've rewritten the docstring to emphasize that the vim-open-node
command is the one and only way to open a node with the vim plugin.
Imo, this is perfectly reasonable: overloading double-clicks is a
very poor interface design.

Here is the docstring::

QQQQQ
''' Enables two-way communication with VIM.

This plugin provides the ``vim-open-node`` command, which opens the
selected node in vim. This *supersedes* the old way of opening nodes
by double-clicking the icon box. Leo will update the node in the
outline when you save the file in vim.

Commands
--------

The **vim-open-node** command opens the selected node in vim. Leo will
update the node in the outline when you save the file in vim.

Installation
------------

Enable this plugin as usual and set the ``vim_cmd`` and ``vim_exe``
settings as shown below. Alternatively, you can ensure that gvim.exe
is on your PATH. gvim is recommended, not the basic console vim.

Settings
--------

**@string vim_cmd** (Important!): The command to execute to start gvim.
Something like::

<path-to-gvim>/gvim --servername LEO

**@string vim_exe** (Important!): The path to the gvim executable.

**vim_plugin_positions_cursor**: Leo will put Vim cursor at same
location as Leo cursor in file.

**vim_plugin_uses_tab_feature**: Leo will put node in a Vim tab card.
'''
QQQQQ

Edward

Kent Tenney

unread,
Oct 2, 2012, 3:44:24 PM10/2/12
to leo-e...@googlegroups.com
On Tue, Oct 2, 2012 at 2:13 PM, Edward K. Ream <edre...@gmail.com> wrote:
> On Thu, Sep 27, 2012 at 12:12 PM, Kent Tenney <kte...@gmail.com> wrote:
>> On Thu, Sep 27, 2012 at 11:57 AM, Joon Ro <joon...@gmail.com> wrote:
>>> Thanks for the reply. alt-x vim-open-node DOES work, but other things do not. vim,py is turned on in @enabled-plugins. Leo goes to heading editing mode when I double click on the node icons.
>
>> I can't help other than confirm I have the same problem.
>
> The "fix" is on the trunk at rev 5477. It is only a change to the
> docstring for vim.py. This is the documentation you see when choosing
> Plugins::Vim.
>
> I've rewritten the docstring to emphasize that the vim-open-node
> command is the one and only way to open a node with the vim plugin.

What about access to vim-open-file for @auto nodes?

> Imo, this is perfectly reasonable: overloading double-clicks is a
> very poor interface design.

Not to mention contrary to the goal of reduced mousing.

Thanks,
Kent
> --
> You received this message because you are subscribed to the Google Groups "leo-editor" group.

Edward K. Ream

unread,
Oct 2, 2012, 5:50:50 PM10/2/12
to leo-e...@googlegroups.com
On Tue, Oct 2, 2012 at 2:44 PM, Kent Tenney <kte...@gmail.com> wrote:

> What about access to vim-open-file for @auto nodes?

What about it?

EKR

Kent Tenney

unread,
Oct 3, 2012, 10:23:28 AM10/3/12
to leo-e...@googlegroups.com
I seem to recall having the option of Leo opening a node
in a vim session, or the whole file. Is this choice available?

>
> EKR

Edward K. Ream

unread,
Oct 3, 2012, 5:31:58 PM10/3/12
to leo-e...@googlegroups.com
On Wed, Oct 3, 2012 at 9:23 AM, Kent Tenney <kte...@gmail.com> wrote:

>>> What about access to vim-open-file for @auto nodes?
>>
>> What about it?
>
> I seem to recall having the option of Leo opening a node
> in a vim session, or the whole file. Is this choice available?

I don't recall ever knowing about such an option. Otoh, you could use
@edit to pass the entire file to vim or emacs.

Edward
Reply all
Reply to author
Forward
0 new messages