Re: Creating a custom browser window.

2006-11-10 Thread Alan Young

No idea what a Blogger entails, but since you mention perl, vim and the net, 
take a look at:
http://www.vim.org/scripts/script.php?script_id=1053


Thank you.  I'll see what I can glean from it.

FYI, I hate blogger.com's interface so I'm writing my own in vim.
That's what I mean by blogger.
--
Alan


Re: Creating a custom browser window.

2006-11-08 Thread Yegappan Lakshmanan

Hello,

On 11/7/06, Alan Young [EMAIL PROTECTED] wrote:

Please forgive me if I use the incorrect terms ... I've been using vim
for years, but am just now getting into more than just the editing part.

I am writing a vim plugin using perl's Net::Blogger so I can make my
blogs entries from vim.  What I'd like to do, if possible, is create a
window that lists the blogs and entries in a window like the one created
when you try to edit a directory.  You can move the cursor up and down
but you can't modify the contents of the buffer.  When you press enter
on an entry it either displays the directory or edits the file.

So, something like this initially:

Blog1
Blog2

When you press enter on Blog1 you'll get:

Blog1
  Article1
  Article2
Blog2

When you press enter on Article1 you'll get a buffer with the contents
of Article1 to modify and repost.

I've gotten the perl/vim interaction down I think, and I program in perl
professionally--this isn't my problem.  I have no idea as to how to go
about doing the above.  Any pointers?

With VIm7 I think I can use the Lists and/or Dictionaries data types
(they seem to be the same as perls array/list and hash types) but I'm
just clueless on how to get the data into the buffer I described, or
even how to create that buffer.



You can use the tree control plugin to implement the above.
The tree control plugin provides a generic tree control interface
to other Vim plugins. The documentation for this plugin is
available at the following page:

http://www.geocities.com/yegappan/treectrl/treectrl.html

You can download the plugin from:

http://www.geocities.com/yegappan/treectrl/treectrl.zip

Let me know, if you have any comments or suggestions.

- Yegappan


Re: Creating a custom browser window.

2006-11-08 Thread Yegappan Lakshmanan

Hi,

On 11/8/06, Alan Young [EMAIL PROTECTED] wrote:

Yegappan Lakshmanan wrote:
 You can use the tree control plugin to implement the above.

Thank you.  I will take a look.



If you need a sample code that uses the tree control, you can use
the attached file explorer plugin. Place this file in the ~/.vim/plugin
directory.

To open the file explorer, use the following command:

   :FileTreeOpen [dirname]

- Yegappan


filetree.vim
Description: Binary data


Re: Creating a custom browser window.

2006-11-08 Thread Alan Young
Yegappan Lakshmanan wrote:
 If you need a sample code that uses the tree control, you can use
 the attached file explorer plugin. Place this file in the ~/.vim/plugin
 directory.
 
 To open the file explorer, use the following command:
 
:FileTreeOpen [dirname]


Where do I put the treectl.vim file? I put it in .vim/plugin and tried
an autoload directory under .vim (your zip has that directory in it) but
filetree.vim won't load (I added an echo in the block that checks for
treectrl#available and go the echo on startup).


Re: Creating a custom browser window.

2006-11-08 Thread A.J.Mechelynck

Alan Young wrote:

Yegappan Lakshmanan wrote:

If you need a sample code that uses the tree control, you can use
the attached file explorer plugin. Place this file in the ~/.vim/plugin
directory.

To open the file explorer, use the following command:

   :FileTreeOpen [dirname]



Where do I put the treectl.vim file? I put it in .vim/plugin and tried
an autoload directory under .vim (your zip has that directory in it) but
filetree.vim won't load (I added an echo in the block that checks for
treectrl#available and go the echo on startup).



Did you restart Vim after you put it in ~/.vim/plugin (for Unix) or 
~/vimfiles/plugin (for Windows)? If you didn't, you should have.


The file containing the function treectl#available() should be named 
[directory]/autoload/treectl.vim where [directory] is ~/.vim or ~/vimfiles, as 
above.


Best regards,
Tony.


Re: Creating a custom browser window.

2006-11-08 Thread Yegappan Lakshmanan

Hi Alan,

On 11/8/06, Alan Young [EMAIL PROTECTED] wrote:

Yegappan Lakshmanan wrote:
 If you need a sample code that uses the tree control, you can use
 the attached file explorer plugin. Place this file in the ~/.vim/plugin
 directory.

 To open the file explorer, use the following command:

:FileTreeOpen [dirname]


Where do I put the treectl.vim file? I put it in .vim/plugin and tried
an autoload directory under .vim (your zip has that directory in it) but
filetree.vim won't load (I added an echo in the block that checks for
treectrl#available and go the echo on startup).



You should place the treectrl.vim file in the ~/.vim/autoload directory.
The filetree.vim plugin should be placed in the ~/.vim/plugin
directory.

- Yegappan


Re: Creating a custom browser window.

2006-11-08 Thread Alan Young
A.J.Mechelynck wrote:
 Did you restart Vim after you put it in ~/.vim/plugin (for Unix) or

I figured out my problem ... I've only got up to patch 110 installed.
I'll have to recompile and try again.


Re: Creating a custom browser window.

2006-11-08 Thread Yegappan Lakshmanan

Hi Alan,

On 11/8/06, Alan Young [EMAIL PROTECTED] wrote:

A.J.Mechelynck wrote:
 Did you restart Vim after you put it in ~/.vim/plugin (for Unix) or

I figured out my problem ... I've only got up to patch 110 installed.
I'll have to recompile and try again.



You need Vim 7.0.135 and above to use the tree control plugin.
This is explained in the tree control plugin help. The patch 135
fixes a problem in Vim7 relating to garbage collecting recursive
List and Dict data structures.

- Yegappan


Creating a custom browser window.

2006-11-07 Thread Alan Young
Please forgive me if I use the incorrect terms ... I've been using vim
for years, but am just now getting into more than just the editing part.

I am writing a vim plugin using perl's Net::Blogger so I can make my
blogs entries from vim.  What I'd like to do, if possible, is create a
window that lists the blogs and entries in a window like the one created
when you try to edit a directory.  You can move the cursor up and down
but you can't modify the contents of the buffer.  When you press enter
on an entry it either displays the directory or edits the file.

So, something like this initially:

Blog1
Blog2

When you press enter on Blog1 you'll get:

Blog1
  Article1
  Article2
Blog2

When you press enter on Article1 you'll get a buffer with the contents
of Article1 to modify and repost.

I've gotten the perl/vim interaction down I think, and I program in perl
professionally--this isn't my problem.  I have no idea as to how to go
about doing the above.  Any pointers?

With VIm7 I think I can use the Lists and/or Dictionaries data types
(they seem to be the same as perls array/list and hash types) but I'm
just clueless on how to get the data into the buffer I described, or
even how to create that buffer.