[Off-topic] Vimperator

2007-04-23 Thread Martin Stubenschrott
I am sorry, if this kind of messages are highly despised on this list.
But since vim-users are my main target group, 

I created a new Firefox extension, which makes browsing the web feel
like browsing a vim buffer:

http://vimperator.mozdev.org

Maybe it helps you vim users, that :wq actually works to quit firefox :)

--
Martin


Re: [Off-topic] Vimperator

2007-04-23 Thread Asiri Rathnayake
On Mon, 2007-04-23 at 11:34 +0200, Martin Stubenschrott wrote:
 I am sorry, if this kind of messages are highly despised on this list.
 But since vim-users are my main target group, 
 
 I created a new Firefox extension, which makes browsing the web feel
 like browsing a vim buffer:
 
 http://vimperator.mozdev.org
 
 Maybe it helps you vim users, that :wq actually works to quit firefox :)

Most of the time I end up typing :wq on gaim IM windows and many other
apps :), this would help i think..

 --
 Martin



Re: possible bug with vim7 and the arrow keys

2007-04-23 Thread Viktor Kojouharov

On 4/23/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Виктор Кожухаров wrote:
 Hello,

 I think there might be a bug with vim7, and they way it handles the
 arrow keys in a terminal.
 The problem is, that in insert mode, the arrow keys don't navigate
 through the text, but output letters. For example, pressing Up in
 insert mode would do the equivalent of OAEsc in normal mode. All the
 arrow keys are printing the letters that are part of their escape codes
 in the line above the current one.
 Also, the reason I think this is a bug is that, on the same machines,
 vim6 works correctly. the TERM variable is set to xterm in both the
 terminal and in vim, and this behaviour occurs in any terminal.
 Furthermore, none of the timeout options have any effect on this
 behaviour.
 Vim has been compiled with +terminfo and +termresponse against
 ncurses-5.6

Don't you have one version compiled with +terminfo and the other with -terminfo?

Are both versions running with the same value of 'ttybuiltin'?

Is 'term' left at its default?

yes


Try the following in both versions:

:echo has(terminfo)
:set term? ttybuiltin?


:echo has(terminfo)
 1
:set term? ttybuiltin?
 term=xterm
 ttybuiltin


Each of the above might explain (with a badly-set-up system) the difference in
behaviour you're seeing.

Also, does it get better or worse if you run vim7 or vim6 (try both) as

vim -u NONE -N

to avoid loading the vimrc, gvimrc and plugins?

I forgot to mention that I've already tried vim -u NONE with no
success (and I've also tried with a clean .vim/ directory without a
.vimrc)

However, I havent tried vim -u NONE with -N. having both -u NONE and
-N makes the keys work. So I'll start with vim -u NONE -N and set each
option in the vimrc manually, to see exactly what breaks the arrow
keys



Best regards,
Tony.
--
If a camel flies, no one laughs if it doesn't get very far.
-- Paul White



.vimrc
Description: Binary data


Re: possible bug with vim7 and the arrow keys

2007-04-23 Thread Viktor Kojouharov

On 4/23/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Виктор Кожухаров wrote:
 Hello,

 I think there might be a bug with vim7, and they way it handles the
 arrow keys in a terminal.
 The problem is, that in insert mode, the arrow keys don't navigate
 through the text, but output letters. For example, pressing Up in
 insert mode would do the equivalent of OAEsc in normal mode. All the
 arrow keys are printing the letters that are part of their escape codes
 in the line above the current one.
 Also, the reason I think this is a bug is that, on the same machines,
 vim6 works correctly. the TERM variable is set to xterm in both the
 terminal and in vim, and this behaviour occurs in any terminal.
 Furthermore, none of the timeout options have any effect on this
 behaviour.
 Vim has been compiled with +terminfo and +termresponse against
 ncurses-5.6

Don't you have one version compiled with +terminfo and the other with -terminfo?

Are both versions running with the same value of 'ttybuiltin'?

Is 'term' left at its default?

Try the following in both versions:

:echo has(terminfo)
:set term? ttybuiltin?

Each of the above might explain (with a badly-set-up system) the difference in
behaviour you're seeing.

Also, does it get better or worse if you run vim7 or vim6 (try both) as

vim -u NONE -N

to avoid loading the vimrc, gvimrc and plugins?


It turned out that these mappings broke the arrow keys in the terminal:
inoremap expr Esc  pumvisible()?\C-E:\Esc
inoremap expr CR   pumvisible()?\C-Y:\CR
inoremap expr Down pumvisible()?\C-N:\Down
inoremap expr Up   pumvisible()?\C-P:\Up
inoremap expr PageDown pumvisible()?\PageDown\C-P\C-N:\PageDown
inoremap expr PageUp   pumvisible()?\PageUp\C-P\C-N:\PageUp



Best regards,
Tony.
--
If a camel flies, no one laughs if it doesn't get very far.
-- Paul White



Re: suggestion

2007-04-23 Thread Marc Weber
On Tue, Apr 17, 2007 at 10:35:14PM -0400, David Howland wrote:
 Dear Vim gods,
 
 Please consider adding the following command to Vim:
 :bc  (for buffer close)
 It acts just like :bd , except that if the buffer is in a split window, 
 it does not remove the window.
 Thank you.

I've seen this somewhere.. 
Yeah. http://mysite.verizon.net/astronaut/vim/index.html 
See Deleting a buffer without changing you window layout..

Marc


Re: possible bug with vim7 and the arrow keys

2007-04-23 Thread Charles E Campbell Jr

Viktor Kojouharov wrote:


It turned out that these mappings broke the arrow keys in the terminal:
inoremap expr Esc  pumvisible()?\C-E:\Esc
inoremap expr CR   pumvisible()?\C-Y:\CR
inoremap expr Down pumvisible()?\C-N:\Down
inoremap expr Up   pumvisible()?\C-P:\Up
inoremap expr PageDown 
pumvisible()?\PageDown\C-P\C-N:\PageDown
inoremap expr PageUp   
pumvisible()?\PageUp\C-P\C-N:\PageUp


IMHO, if one is expecting to use vim (as opposed to gvim), mapping Esc 
causes trouble.
That's because most terminals issue escape sequences 
(esc..something..) when special
keys (such as the arrow keys, functions keys, etc), and that mapping of 
the esc key
messes up the escape sequence.  Besides -- how do you get out of insert 
mode?  I realize
one can use ctrl-o and norm!,  but that seems painful.  If you're not 
using normal mode

or command mode, then you're missing a lot of vim.

Regards,
Chip Campbell



Re: possible bug with vim7 and the arrow keys

2007-04-23 Thread Виктор Кожухаров
В пн, 2007-04-23 в 19:56 +0200, Nikolai Weibull написа:
 On 4/23/07, Charles E Campbell Jr [EMAIL PROTECTED] wrote:
  Viktor Kojouharov wrote:
 
   It turned out that these mappings broke the arrow keys in the terminal:
   inoremap expr Esc  pumvisible()?\C-E:\Esc
 
  IMHO, if one is expecting to use vim (as opposed to gvim), mapping Esc
  causes trouble.
  That's because most terminals issue escape sequences
  (esc..something..) when special
  keys (such as the arrow keys, functions keys, etc), and that mapping of
  the esc key
  messes up the escape sequence.
 
 That's only true if Vim actually interprets the characters coming in
 as normal characters and not an escape sequence.  In that case it
 doesn't matter if Esc is remapped or not, you're going to get weird
 results anyway.
 
  Besides -- how do you get out of insert
  mode?  I realize
  one can use ctrl-o and norm!,  but that seems painful.  If you're not
  using normal mode
  or command mode, then you're missing a lot of vim.
 
 If the pum isn't visible it maps to Esc, so it's not hard to get out
 of insert mode.  Just make sure the pum isn't visible.
 
That was the idea behind the mappings, which I took from a vimtip btw.
But something happens, and none of the remapped keys (besides the Esc)
work correctly if the pum is not visible. Perhaps it might still be a
bug in vim7, but at least its explained now why vim6 works correctly.
   nikolai
-- 
Виктор Кожухаров /Viktor Kojouharov/


signature.asc
Description: Това	 е цифрово	 подписана	 част от	 писмото


Re: wish: allow a: in the function def

2007-04-23 Thread Nikolai Weibull

On 4/23/07, Yakov Lerner [EMAIL PROTECTED] wrote:

wish: allow a: in the function definition line:
  function foo(a:line1, a:line2)
This is currently not allowed. But it seems logical to allow it.


Why should it be?  Extra typing?

Counterwish: implement better semantics for VimScript so that the
lookup order of variables alleviates the need for explicit
environments.  Yes, this will break backwards compatibility.  Tough.

 nikolai


Re: [PATCH] Determining whether a window used :lcd

2007-04-23 Thread Nikolai Weibull

On 4/20/07, Bram Moolenaar [EMAIL PROTECTED] wrote:


On 4/11/07, Bob Hiestand [EMAIL PROTECTED] wrote:



 The attached patch very simply implements the following from the todo:



 7   There is no way to change directory and go back without changing the local
 and/or global directory.  Add a way to find out if the current window uses
 a local directory.  Add cdcmd() that returns :cd or :lcd?



If you agree, and nobody has something to say on this, can you change
your patch?


Wait!  I have a comment!  Isn't this todo just a subset of

6   Add :cdprev: go back to the previous directory.  Need to remember a
   stack of previous directories.  We also need :cdnext.

with local directory alternatives as well?  One could then change
directory and simply pop the top of the cd stack when one is done.  Of
course, this could quite easily be implemented in VimScript if builtin
commands could be overridden, like :cd and :lcd.  Then one could
maintain a stack with a VimScript list.

An alternative, seeing as how we've already discussed overriding
builtin commands and my side of the argument lost, would be to add a
DirectoryChanged autocommand.  Then one could at least implement
:Cdprev and :Cdnext.

I'm probably missing something here, but I can't see what it is.

 nikolai