Re: Restarting the vim-emulation project

2014-07-24 Thread Zoltan Benedek
Excellent!

For me the main obstacle in adopting Leo was Vim. Vim is so powerful and 
efficient, you can work by keyboard only.

Thanks Edward, for your endeavor and work.
Zoltan


On Wednesday, July 23, 2014 3:54:36 PM UTC+3, Edward K. Ream wrote:

 Encouraged by the success of the simplified persistence project, I am 
 going to restart the vim-emulation project.

 All aspects of the design will be based on simplicity and accuracy. I have 
 spent several hours recently playing with vim and noticing subtleties about 
 vim's screen and handling of the dot. I shall attempt the best possible 
 emulation of vim, constrained by the following simplifying principles:

 1. For now, and probably forever, the code will assume the typical vim key 
 bindings.  Not sure about vim key mapping, but that can wait.

 2. The vim key bindings will apply only to plain keys (when @bool vim_mode 
 = True).  Leo's existing key bindings will still apply for non-plain (Alt, 
 Ctrl, Meta) keys, even when vim_mode is True.  However, it's possible that 
 a few control keys will be handled differently in vim_mode in a hard-wired 
 way...

 This great divide of keystrokes is the simplest thing that could 
 possibly work.  Furthermore, it allows the vim emulation to work in the 
 much-more-complex Leonine environment *without* having to change any plain 
 vim bindings!  The trick is to use the Leo bindings for the Alt-Arrow keys 
 and return to shift focus to and from the outline. Return never makes 
 any sense when in the outline (in vim insert mode), so it may as well shift 
 focus back to the body pane and enter normal mode.  Slick.

 This great divide does have a few complications involving non-plain 
 keys, especially Ctrl-G and Ctrl-R, but we'll muddle through somehow.  The 
 point is that vim is focused on plain keys, so getting them *exactly* right 
 is the main problem.

 3. I'll attempt as accurate an emulation as possible, including Visual 
 and Selection modes, and especially attempting to recreate the cursor and 
 selection areas exactly.  I don't necessarily plan a *complete* emulation 
 of every possible combination of plain keys.  I'll start off with the most 
 useful, and add others if and when anyone requests them.

 4. Vim emulation will be based on a set of official commands whose names 
 start with vim_:  vim_a, vim_dot, etc.  These commands will update vim's 
 dot as appropriate, and emulate the corresponding vim commands as closely 
 as possible.

 5. Vim's ':' key in normal mode will probably be a synonym for Alt-X.  
 This seems reasonable because : commands do not affect the dot.

 That's all for now.  Your comments and corrections are welcome.

 I expect to be able to use vim mode comfortably myself in just a few days.

 Edward



-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: @url not working?

2014-07-24 Thread Fidel N
Hey:
Did you try control + click the headline?


On Thu, Jul 24, 2014 at 6:25 AM, Indrajith indrajit...@gmail.com wrote:

 I am returning to Leo after a very long time. The last time I was using it
 was in 2008 or so, when it was still developed using Tk. I used to use @url
 quite a lot, and is one of the reason, I am coming back. But now, it seems
 in the Qt version something seems to have changed. @url in headline of the
 node is not opening the link in the browser.

 My node headline looks like

 @url http://www.google.com


  I tried it using the stable version 4.11 and also the nightly snapshop. I
 am not sure, whether this is something due to my OS which is Windows 8 or
 is my usage wrong or is there any settings to be changed to get this
 behavior - help will be appreciated.

 -Ik

 --
 You received this message because you are subscribed to the Google Groups
 leo-editor group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to leo-editor+unsubscr...@googlegroups.com.
 To post to this group, send email to leo-editor@googlegroups.com.
 Visit this group at http://groups.google.com/group/leo-editor.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: @url not working?

2014-07-24 Thread Indrajith
Thanks, it works on Ctrl +  Click (Left Button)

But, some observations.

Case 1: Node Headline in the format -  @url address with *out* http://
It doesn't work. :(

Case 2: Node Headline in the format - @url address with http:// 
:) Works

Case 3: Node Headline in the format @url some text , body with url in the 
form www.google.com
Don't Work :( 

Case 4: Node Headline in the format @url some text , body with url in the 
form http://www.google.com
:) Works. 

Is this the desired behavior?

Thx
-Ik



On Thursday, July 24, 2014 12:44:53 PM UTC+5:30, Fidel N wrote:

 Hey:
 Did you try control + click the headline?


 On Thu, Jul 24, 2014 at 6:25 AM, Indrajith indra...@gmail.com 
 javascript: wrote:

 I am returning to Leo after a very long time. The last time I was using 
 it was in 2008 or so, when it was still developed using Tk. I used to use 
 @url quite a lot, and is one of the reason, I am coming back. But now, it 
 seems in the Qt version something seems to have changed. @url in headline 
 of the node is not opening the link in the browser.

 My node headline looks like

 @url http://www.google.com


  I tried it using the stable version 4.11 and also the nightly snapshop. 
 I am not sure, whether this is something due to my OS which is Windows 8 or 
 is my usage wrong or is there any settings to be changed to get this 
 behavior - help will be appreciated.

 -Ik

 -- 
 You received this message because you are subscribed to the Google Groups 
 leo-editor group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to leo-editor+...@googlegroups.com javascript:.
 To post to this group, send email to leo-e...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/leo-editor.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Problem DnD of a file to Node

2014-07-24 Thread Indrajith
There seems to be a problem with Leo 4.11  Windows 8. 
DnD of file from Desktop to the node, only puts the name of the file. 
But, if the file is DnD from any other folder through explorer then file:// 
is appearing. 
Seems to be a bug.

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: @url not working?

2014-07-24 Thread Fidel N
I think so, the only way a URL can be detected within a string is through 
the http// in the beginning.

The fact is that common URL detection is being used for opening the url's, 
meaning, the common url detection script doesnt take the advantage of 
knowing that the node is a @url node to guess that any other strings than 
http ones can also be links. (This is my take on this, I didn't check the 
code to confirm it)

There are two ways out of this that I can think of, I would just replace 
any weblink I had into starting with http:
A script such as:

for p in c.p.all_positions():
if p.startswith(@url):
p.h = p.h.replace(www.,http://www.;)
p.b = p.b.replace(www.,http://www.;)
should do the trick.

The other way out is finding and editing the control+click binding - 
control +click command, then edit that code to also identify www.xxx as 
urls.

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Standarized file importing, and keeping Leo updated

2014-07-24 Thread 'Terry Brown' via leo-editor
On Thu, 24 Jul 2014 02:31:34 -0700 (PDT)
Fidel N fidelpe...@gmail.com wrote:

 #Replacement of your method:
 c.frame.tree.treeWidget.urlDrop = urlDrop
 c.frame.tree.treeWidget.urlDrop = types.MethodType(urlDrop,
 c.frame.tree. treeWidget.urlDrop)

I think that should be just one assignment:

c.frame.tree.treeWidget.urlDrop = types.MethodType(
urlDrop, c.frame.tree.treeWidget)

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Representing Leo outlines in git

2014-07-24 Thread Fidel N



 When you cut an outline, then paste it otherwhere (same or other file), 
 you 
  loose the gnx of every node in that outline. 

 The Paste Node As Clone (paste-retaining-clones) command preserves 
 gnx's, and hence clone links. 

 Edward 


Shouldn't paste-clone do a paste-retaining-clones by default when no more 
nodes with same gnx are in the outline?
That would enable the cut/paste feature we talk so much about (coz I keep 
bringing it up hehe)

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Standarized file importing, and keeping Leo updated

2014-07-24 Thread Fidel N
Hehe yes, thanks :)


On Thu, Jul 24, 2014 at 3:31 PM, 'Terry Brown' via leo-editor 
leo-editor@googlegroups.com wrote:

 On Thu, 24 Jul 2014 02:31:34 -0700 (PDT)
 Fidel N fidelpe...@gmail.com wrote:

  #Replacement of your method:
  c.frame.tree.treeWidget.urlDrop = urlDrop
  c.frame.tree.treeWidget.urlDrop = types.MethodType(urlDrop,
  c.frame.tree. treeWidget.urlDrop)

 I think that should be just one assignment:

 c.frame.tree.treeWidget.urlDrop = types.MethodType(
 urlDrop, c.frame.tree.treeWidget)

 Cheers -Terry

 --
 You received this message because you are subscribed to the Google Groups
 leo-editor group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to leo-editor+unsubscr...@googlegroups.com.
 To post to this group, send email to leo-editor@googlegroups.com.
 Visit this group at http://groups.google.com/group/leo-editor.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.