Saturday, November 27, 2010

Re: Emacs' Org-mode clone for Vim

On Nov 27, 3:46 am, ZyX <zyx....@gmail.com> wrote:
> Reply to message «Re: Emacs' Org-mode clone for Vim»,
> sent 14:08:31 27 November 2010, Saturday
> by ZyX:
>
> Some additional notes:
> 1. Do not pollute buffer and global scopes with lots of variables: either use
> two dictionaries (one global and one buffer) which will hold all of them (for
> example, see how it is implemented in vim-addon-manager), or do as I do: purge
> out all global and buffer variables, use script-global dictionary with buffer
> numbers as keys to emulate buffer-local variables and just script variables for
> other purposes.
>

Zyx -- That's an interesting approach. My main plan has been to go
through and refactor at some point (probably coming soon now) to make
sure all the globals have a prefix of 'org_' or something else that
would diffferentiate them from other plugins.

The dictionary approach sounds interesting but I wonder about the
performance implications. I know Dicts are indexed, but won't there
still be noticeable slowdown if that approach is used in loop
repeated, say, 1,000 times? 10,000 times? Or is dict approach better
limited to cases where variable is referenced in situation where
performance isn't an issue?

-- Herb

--
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

No comments:

Post a Comment