Level/tree-aware put

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

Level/tree-aware put

Noel Henson
Everyone,

Here is a small script that remaps the p and P normal commands such that VO
will do what one would expect when pasting cut/copied nodes into another
section of an outline. It will adjust the indents and not paste into the
middle of a branch.

Just "so vo_smartpaste.vim" to use it.

Let me know how it works for you. If it works well, I'll put it into
vo_base.vim in the next release.

Noel


--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.



_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

vo_smartpaste.vim (519 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Level/tree-aware put

Noel Henson
And I thought everyone wanted outline-aware yank/delete/put functions. LOL

Noel

On Saturday 18 October 2008, Noel Henson wrote:

> Everyone,
>
> Here is a small script that remaps the p and P normal commands such that
> VO will do what one would expect when pasting cut/copied nodes into
> another section of an outline. It will adjust the indents and not paste
> into the middle of a branch.
>
> Just "so vo_smartpaste.vim" to use it.
>
> Let me know how it works for you. If it works well, I'll put it into
> vo_base.vim in the next release.
>
> Noel



--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Level/tree-aware put

Hans Voss
I very much do like it, I just haven't been able to take the time out
to install and test.

On Mon, Oct 20, 2008 at 23:07, Noel Henson <[hidden email]> wrote:

> And I thought everyone wanted outline-aware yank/delete/put functions. LOL
>
> Noel
>
> On Saturday 18 October 2008, Noel Henson wrote:
>> Everyone,
>>
>> Here is a small script that remaps the p and P normal commands such that
>> VO will do what one would expect when pasting cut/copied nodes into
>> another section of an outline. It will adjust the indents and not paste
>> into the middle of a branch.
>>
>> Just "so vo_smartpaste.vim" to use it.
>>
>> Let me know how it works for you. If it works well, I'll put it into
>> vo_base.vim in the next release.
>>
>> Noel
>
>
>
> --
>
> ------------------------------------------------------------------
>  Noel Henson
>  www.noels-lab.com     Chips, firmware and embedded systems
>  www.vimoutliner.org   Work fast. Think well.
>
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>



--
----
Met vriendelijke groeten / With kind regards
Hans Voss
---------------------------------------
* Infrastructure Architect
* Open Source, Networking and Security
* General Open Sourcerer
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* My blog: http://jazzterdaily.blogspot.com - Tech and other news that
caught my attention.
* Google Reader: My shared News feed:
https://www.google.com/reader/public/atom/user/02723796534474865919/state/com.google/broadcast
* Linked In page: http://www.linkedin.com/in/hansvoss
* google talk enabled
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Level/tree-aware put

Hans Voss
Noel,

I have tried it (I came to a point where it would be VERY useful to
have). and guess what.
It IS very useful to have.
It works as I exptected it to work. Brilliant.

Situation:
I have an outliner file (scratchpad.otl) always open in GVIM to make
quick notes for "whatever".
I had a phone call and made notes in scratchpad
I wanted to transfer those notes to a more permanent/ordered file and structure.
Which means that I needed to copy it from a "level 1" outline to a
"level 3" outline.
Without sourcing vo_smartpaste it just plain copied the lines
With vo_smartpaste it included them at exactly the right level...

Thanks.

On Tue, Oct 21, 2008 at 21:39, Hans Voss <[hidden email]> wrote:

> I very much do like it, I just haven't been able to take the time out
> to install and test.
>
> On Mon, Oct 20, 2008 at 23:07, Noel Henson <[hidden email]> wrote:
>> And I thought everyone wanted outline-aware yank/delete/put functions. LOL
>>
>> Noel
>>
>> On Saturday 18 October 2008, Noel Henson wrote:
>>> Everyone,
>>>
>>> Here is a small script that remaps the p and P normal commands such that
>>> VO will do what one would expect when pasting cut/copied nodes into
>>> another section of an outline. It will adjust the indents and not paste
>>> into the middle of a branch.
>>>
>>> Just "so vo_smartpaste.vim" to use it.
>>>
>>> Let me know how it works for you. If it works well, I'll put it into
>>> vo_base.vim in the next release.
>>>
>>> Noel
>>
>>
>>
>> --
>>
>> ------------------------------------------------------------------
>>  Noel Henson
>>  www.noels-lab.com     Chips, firmware and embedded systems
>>  www.vimoutliner.org   Work fast. Think well.
>>
>> _______________________________________________
>> VimOutliner mailing list
>> [hidden email]
>> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
>>
>
>
>
> --
> ----
> Met vriendelijke groeten / With kind regards
> Hans Voss
> ---------------------------------------
> * Infrastructure Architect
> * Open Source, Networking and Security
> * General Open Sourcerer
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> * My blog: http://jazzterdaily.blogspot.com - Tech and other news that
> caught my attention.
> * Google Reader: My shared News feed:
> https://www.google.com/reader/public/atom/user/02723796534474865919/state/com.google/broadcast
> * Linked In page: http://www.linkedin.com/in/hansvoss
> * google talk enabled
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>



--
----
Met vriendelijke groeten / With kind regards
Hans Voss
---------------------------------------
* Infrastructure Architect
* Open Source, Networking and Security
* General Open Sourcerer
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* My blog: http://jazzterdaily.blogspot.com - Tech and other news that
caught my attention.
* Google Reader: My shared News feed:
https://www.google.com/reader/public/atom/user/02723796534474865919/state/com.google/broadcast
* Linked In page: http://www.linkedin.com/in/hansvoss
* google talk enabled
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Level/tree-aware put

Ross Boylan
In reply to this post by Noel Henson
On Mon, 2008-10-20 at 14:07 -0700, Noel Henson wrote:
> And I thought everyone wanted outline-aware yank/delete/put functions. LOL
>
> Noel
I certainly do.  Thanks.
Is there some way to use the code automatically, without needing to
source it?

Ross

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Level/tree-aware put

Noel Henson
On Thursday 23 October 2008, Ross Boylan wrote:

> On Mon, 2008-10-20 at 14:07 -0700, Noel Henson wrote:
> > And I thought everyone wanted outline-aware yank/delete/put functions.
> > LOL
> >
> > Noel
>
> I certainly do.  Thanks.
> Is there some way to use the code automatically, without needing to
> source it?
>
> Ross
>

Ross,

Just put the file into your .vimoutliner/plugins directory (until I merge
it into 0.4.0). Then edit this line in your .vimoutlinerrc file to add let
g:vo_modules_load = "checkbox:hoist:smartpaste"

Noel



--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner