Re: BOF Vim 8 - Suggestions

2007-01-24 Thread Marcus Aurelius

--- "A.J.Mechelynck" <[EMAIL PROTECTED]> escreveu:
> This approach has already been attempted, not just once as Bram said, but at 
> least twice (evim and mswin.vim), and the results are far from convincing: 
> "easy" vim is actually harder to use, and mswin.vim makes some useful Vim 
> features inacessible, and for others, forces constant reminders everywhere in
> 
> the help and in support mailing lists: "If you use Ctrl-V to paste, use
> Ctrl-Q 
> instead whenever the help says to use Ctrl-V".
> 
> "Cream for Vim" may be a third attempt but I'm not sure, I haven't looked
> into it.

I think i must defend mswin.vim here (and ":behave mswin") ;-)
Some shortcuts are really invaluable:
Ctrl+S (save, compare to :w; i use Ctrl+S a lot!), Ctrl+Tab (next window,
compare to Ctrl+W, W), Ctrl+Z (undo... i'm so used to Ctrl+Z...), 

Others, such as Ctrl+A (select all) and Ctrl+V (paste) do conflict with other
commands, but compare them to ggVG and "+p

Sometimes i miss Ctrl+Backspace (for delete word backward) and Ctrl+Delete
(delete word forward).

My main gripe about Vim commands is that gj and gk are almost unusable without
a bunch of mappings, and formatting a paragraph takes 4 keys (gwip - i hav
mapped it to F12). Well, if you format the paragraph you don't need gj and gk,
but you get the idea... ;-)

I do like Vim commands, but the commands Ctrl+{A,Z,X,C,V,Y,Tab} are so widely
available that i'm used to use them in Vim too.


Marcus

__
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 


Re: plugin loading ordering

2007-01-24 Thread Stefano Zacchiroli
On Wed, Jan 24, 2007 at 09:48:03AM +0100, A.J.Mechelynck wrote:
> That's what ":scriptnames" should show. If a plugin has a ":finish" clause 
> near the start, it might get loaded and do nothing, but still appear in the 
> ":scriptnames" listing.

Thanks, I was not aware of the :scriptnames command.

> What you describe lets me believe that there's something in your 
> ~/.vim/plugin (maybe ~/.vim/plugin/matchit.vim ?) which invokes (or is) 
> some version of matchit.

Gotcha, I had indeed a symlinked matchit.vim from my ~/.vim/. Sorry for
the noise.

Cheers.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?/\All one has to do is hit the
(15:57:15)  Bac: no, la demo scema\/right keys at the right time


Re: plugin loading ordering

2007-01-24 Thread A.J.Mechelynck

Stefano Zacchiroli wrote:

According to my reading of :help load-plugins the plugins should be
loaded following the runtimepath ordering. That is: first load all the
plugins in the first component of runtimepath, then all the plugins in
the second component and so on.

According to my experiments however this is not the case. It looks like
all the plugins from all the components of the runtimepath are loaded in
alphabetic order.

For example, I have the following runtimepath:

  
runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,/var/lib/vim/addons/after,~/.vim/after

with matchit.vim installed (i.e. symlinked) under
/usr/share/vim/addons/plugin/. If I add the following plugin to my
~/.vim:

  $ cat .vim/plugin/no-matchit.vim
  let loaded_matchit = 1

matchit is still loaded and works properly (note that no-matchit >
matchit in alphabetic order). However if I move it as follows:

  $ mv .vim/plugin/no-matchit.vim .vim/plugin/lo-matchit.vim

matchit is prevented to be loaded.

Is this a bug or a underspecification in the vim docs?

Cheers.



According to your settings, the plugins ought to be loaded in the following 
sequence (which seems unduly complicated to me but that's not my business):


1. everything in ~/.vim/plugin/*.vim
2. everything in /var/lib/vim/addons/plugin/*.vim
3. everything in /usr/share/vim/addons/plugin/*.vim
4. everything in /usr/share/vim/vimfiles/plugin/*.vim
5. everything in /usr/share/vim/vim70/plugin/*.vim
6. everything in /usr/share/vim/vimfiles/after/plugin/*.vim
7. everything in /usr/share/vim/addons/after/plugin/*.vim
8. everything in /var/lib/vim/addons/after/plugin/*.vim
9. everything in ~/.vim/after/plugin/*.vim

That's what ":scriptnames" should show. If a plugin has a ":finish" clause 
near the start, it might get loaded and do nothing, but still appear in the 
":scriptnames" listing.


What you describe lets me believe that there's something in your ~/.vim/plugin 
(maybe ~/.vim/plugin/matchit.vim ?) which invokes (or is) some version of matchit.



Best regards,
Tony.


plugin loading ordering

2007-01-24 Thread Stefano Zacchiroli
According to my reading of :help load-plugins the plugins should be
loaded following the runtimepath ordering. That is: first load all the
plugins in the first component of runtimepath, then all the plugins in
the second component and so on.

According to my experiments however this is not the case. It looks like
all the plugins from all the components of the runtimepath are loaded in
alphabetic order.

For example, I have the following runtimepath:

  
runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,/var/lib/vim/addons/after,~/.vim/after

with matchit.vim installed (i.e. symlinked) under
/usr/share/vim/addons/plugin/. If I add the following plugin to my
~/.vim:

  $ cat .vim/plugin/no-matchit.vim
  let loaded_matchit = 1

matchit is still loaded and works properly (note that no-matchit >
matchit in alphabetic order). However if I move it as follows:

  $ mv .vim/plugin/no-matchit.vim .vim/plugin/lo-matchit.vim

matchit is prevented to be loaded.

Is this a bug or a underspecification in the vim docs?

Cheers.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?/\All one has to do is hit the
(15:57:15)  Bac: no, la demo scema\/right keys at the right time


Re: Suggestion: numbers for completion menu?

2007-01-24 Thread Nikolai Weibull

On 1/23/07, Marc Weber <[EMAIL PROTECTED]> wrote:

It would be convinient to get an item from the completion menu faster
than  .. or typing more characters.

What do you think of prepending each item with a number and add a
key-mapping
 to get the idxth item?
so 4 would select the 4th.

Would it be convinient to add another mapping space for completions?
mnoremap 2 2 ?
m = omni completion _m_enu ?

Or is there another easy way to achieve this ?


I've already mentioned this here:

http://thread.gmane.org/gmane.editors.vim.devel/15344/focus=15344

Here's the mappings:

for digit in [1, 2, 3, 4, 5, 6, 8, 9]
 execute 'inoremap  ' . digit . ' =pumvisible() ? "' .
   \ repeat('\C-N>', digit) . '" : "' . digit . '"'
endfor

However, what I also mention there is that the completion menu
flickers like mad if you use this.  It shouldn't be redrawn quite as
often as it currently is, and not as much of it either.

 nikolai