[haiku-development] Re: Vim episodes. IV. It is ready to breathe...

Hi Ingo

Ingo Weinhold wrote:
On 2009-05-05 at 23:18:05 [+0200], Siarzhuk Zharski <zharik@xxxxxx> wrote:
+ * However, from a B_SINGLE_LAUNCH viewpoint, the first is better.
+ * If Vim is marked "Single Launch" in its application resources,

2) Personally I prefer to have running multiple instances of vim, but
what is "ideologically" right? Note that currently only one binary

I'm not entirely sure I understand you point. Single launch has its uses -- in fact most applications are single launch.

But every document produce it's own window. I think this is not a case of vim - it has it's own documents/windows management and from the user's point of view vim session looks like a single "document".

Regarding vim it mainly depends whether it can handle multiple documents (and does so in a reasonable way). In doubt make it multi launch.

Current implementation with "single instance launch" looks inconsistent in following scenarios:

I.
a) Open some file with vim in _console_ session in Terminal.
b) Select some of supported files in Tracker and try to open it by "Open With... -> vim" context menu command. No reaction, no files opened in existing vim session.

II
a) Open some file in GUI version of vim.
b) Select some file in Tracker and force "Open With ... -> vim" menu command. File is added into running vim session. c) Move vim GUI window beneath of many Tracker windows - just to hide it form the user. d) Select some other file in Tracker and force "Open With ... -> vim" menu command on it. File is added into running vim session but the main vim window is left inactive somewhere under other windows. From the user point of view - it looks like nothing happened.

Yes, the second scenario can be probably fixed by popuping existing vim GUI on top of other windows in case opening new file, but how to fix the first scenario? Separate vim and gvim to different binaries and do not add resources to first one?

Note that multi instance build of vim open new window on every call of "Open With... -> vim" menu item. Possible problem here is opening the _same_ file _twice_. :-)

3) Finally we can do something with ticket 2887 (
http://dev.haiku-os.org/ticket/2887 ) Many people in comments to that
issue say that they'll be happy to have vim as optional package. I have
fixed some problems in building "tiny" and "small" versions of vim and
now it is possible to save some space and use those reduced vim versions
for basic Haiku distribution. Which set of features "is required" for
"stock" version of vim in Haiku? What is your opinions? Are we need gui,
menu, etc?

I've no idea what the difference between tiny and small is.

I think, that tiny version is more basic and close to classical vi. Most of "improved" features are disabled in it.

At any rate IMHO the only reason for vim in the Haiku base is that a command line editor is needed (personally I don't even care whether this is vim or pico or whatever).

Some comment in mentioned "vim upgrade" ticket http://dev.haiku-os.org/ticket/2887#comment:11 say that vi is a POSIX requirement. Is it true?

So GUI is definitely not needed. If the GUI part is available as an additional optional package, I wouldn't mind.

We can save about 900 kilobytes of vim binary file size and, probably, can throw away most of ~18 megabytes in vim runtime files that are related to disabled features.

5) As I can see, usual place for most of optional packages is
haiku-files.org. Is it possible to put full featured Vim optional
package on it? Who should I contact to provide all required information
about build procedure?

Several people have write access to the server. In doubt drop a link to the package here.
OK, thank you.

MfG,
  S.Zharski.


Other related posts: