Re: warnings: O_NOFOLLOW redefined.

2006-11-05 Thread maurice barnum
Bram Moolenaar [EMAIL PROTECTED] writes:

: Including fcntl.h was needed in only a few files in the past, that's why
: it's included in individual .c files.  But we might as well move it to
: vim.h now, since it's used by quite few .c files.

: Did you try including fcntl.h in vim.h, before the define of O_NOFOLLOW?

no.  that would work, too.  i put it in os_unix.h because it seemed to
be the right place to include a unix specific header and it was
included by vim.h before the define.  it wasn't clear to me when a 
system specific header is included in vim.h, and when it comes from
os_*.h.






Re: noimd don't works under linux

2006-11-05 Thread A.J.Mechelynck

Eddy Zhao wrote:
[...]

Hi Tony,

I only using IM in gvim. So I only want IM work correctly in gvim.
gvim is with +xim support.

Thanks
Eddy



Well, I suppose that explains why you can't set 'imd' in Console Vim.


Best regards,
Tony.


Re: noimd don't works under linux

2006-11-05 Thread Eddy Zhao

I do the following
 - gvim -u NONE
 - :set stl=%{imd} ls=2
 - :inoremap ESC ESC:set imdCR
 - :nnoremap i :set noimdCRi
 - :set nocp
 - switching back  forth between normal mode  insert mode using ESC  i

When I pressing i, the input focus is on command line  command line
shows :set noimdCRi.

If I using :nnoremap i :set noimdCRiCR, pressing i get me to
insert mode (with an extra newline). But switching back  forth between
normal mode  insert mode, status line always shows 0



Does this reveal some root cause of the problem? How can I further narrow
down the problem?


Thanks
Eddy


Re: New vimscript distribution idea/ first beta implementation tell my your opinion

2006-11-05 Thread Yakov Lerner

On 11/5/06, Marc Weber [EMAIL PROTECTED] wrote:

I've posted some time ago about this ideas:

seperate user interface (mappings autocommands ..) from script code.
Unify efforts (thus make it easier to existing code) ..

I did call my attempt vimlib.
It can be used here:
http://mawercer.de/marcweber/vim/vimlib/

You can try out the installer files how it might look like to install different 
scripts.
If you want add another runtimepath to be sure to not modify your existing vim 
configuration (1)

goto docs - index_file.html to get some overview of all files.
Especially I recommend reading:
vl_create_docs.vim ( how the documentation has been created 
automatically from .vim source file comments)
scriptsettings.vim ( how to save / load user settings )
vimlib.vim ( more about this idea.)
vim_vimlib.vim ( how a user interface can be distributed )
taghelper.vim ( define tag profiles and add tag/ create tag files 
really easily )
vimfile.vim ( vim autoload function prefix correction / function 
completion )
scan_and_cache_file.vim ( calls a scanning func to extract some 
information which is cached in mem or additionally in a file. see vimfile.vim 
for examples)
multifile_distribution.vim/ create_installer.vim / 
create_installer_examples ( creates the installer)

Its even posseble to browse documentation, copy some example code and run 
DownloadEverythingNeededFor file
to get all dependencies automatically after installing the base files using the 
installer.
Some things might be broken and much isn't implemented yet..

Currently darcs is used as version control system.
If you want to get everything use
darcs get http://mawercer.de/marcweber/vim/vimlib/repository/
Then its easy to create and send patches.

But last but not least I need your comments.
Do you think it would be useful to put more efforts into developing this?

Greetings Marc

(1)
just enter eg /home/you/vimlib_test as runtimepath to save to
add
set runtimepath+=~/vimlib_test
to your .vimrc
After finishing testing you can remove the directory and nothing will be left 
except of
~/.vim/permanent_memory ( used to cache file scan results) and
~/.vim/scriptsettings ( used to save script settings )



Where is user documentation ? Readme-shmeadme ?

Yakov


Re: BufEnter Oddity After TabEnter

2006-11-05 Thread Yakov Lerner

On 11/5/06, Bill McCarthy [EMAIL PROTECTED] wrote:

Hello Vim List,

I am having a problem trying to echo a message triggered by
an autocmd on BufEnter when entering a tab page.

Try this:

:au BufEnter foo echom Entered foo

First lets try opening a window on the same tab page:

:sp foo

The message appears in the command line area as expected.
Switching between windows, the messages is seen each time
foo is entered.

Wipe foo with:  :bw foo

Now try a tab page:

:tabe foo

The message appears as expected.  However leaving and then
entering the foo tab page does not display the message!

Typing :mes shows that the message was indeed displayed.
What is overwriting it?


I can see this, too. The message is visible for some time if I add
sleep or while getchar(1)|endwh to the rhs of 'au', but disappears
right after that. Is it tab switching that causes wipeout of the
message ?

Yakov


RE: --remote diff to tab

2006-11-05 Thread Hugo Ahlenius
| I am trying to set up my subversion client(s) so that I can get any 
| diffs open in a proper diff mode, in an existing gvim
|session, in a new tab...
|
| Did you try (untested by me)
|
|--remote-tab +diffsplit %2 %1
|
|(Will the %2 need any special escaping inside the quotes?  
|What if %2 has spaces in the file name (ugh)?)

Thanks Benji, that is on the right track. Maybe I have to call a script that
does what I want to do. This works, but as you mentioned, it has a problem
with paths/files that has spaces in them. I try to avoid that, but it is
known to happen now and then...

/Hugo




test49 FAILED

2006-11-05 Thread pizomer

Hi all
I have a question
How I can find why 'make test'
fails on test #49 .

I commpile vim with the following

./configure --enable-perlinterp \
[1230]
--enable-pythoninterp \
--enable-tclinterp \
--enable-rubyinterp \
--enable-sniff \
--enable-multibyte \
--enable-xim \
--enable-fontset \
--enable-gui \
--with-vim-name=vi7 \
--with-ex-name=ex7 \
--with-view-name=vimv7 \
--with-features=huge \
[EMAIL PROTECTED] \
--with-x \
--with-python-config-dir=/usr/local/lib/python2.4/config

and I am on

Linux localhost 2.6.16.13-4-default #1 Wed May 3 04:53:23 UTC 2006 x86_64 
x86_64 x86_64 GNU/Linux

I will appreciate all tips/ideas
Thanks.




Re: noimd don't works under linux

2006-11-05 Thread Benji Fisher
On Sun, Nov 05, 2006 at 03:13:20PM +0800, Eddy Zhao wrote:
[snip]
 Thanks (I forget to set ls).
 
 I do the following
 - gvim -u NONE
 - :set stl=%{imd} ls=2
 - :inoremap ESC ESC:set imdCR
 - :nnoremap i :set noimdCRi
 - :set nocp
 - switching back  forth between normal mode  insert mode using ESC  i
 
 When I pressing i, the input focus is on command line  command line
 shows :set noimdCRi.

 Part of the problem is that you defined the :map commands with 
notation before setting 'nocp'.  From another post on this thread, I see
that you want to try this with gvim, not terminal vim.  So please try

$ gvim -u NONE
:set nocp
:set laststatus=2 stl=%{imd}
:inoremap ESC ESC:set imdCR
:nnoremap i :set noimdCRi

and *then* try going from Normal mode to Insert mode and back with i and
Esc.  The status line should show the current value of the 'imdisable'
option.

 If the 0 or 1 in the status line is too terse, you could be a
little fancier.  For example,
:set laststatus=2 stl=%{imd?'IM\ disabled':'IM\ enabled'}

HTH --Benji Fisher


avoiding unneeded buffer scrolling

2006-11-05 Thread mzyzik
All,

It bothers me how when switching between tabs (gt) or switching between
buffers (:bn, :bp), sometimes a buffer will end up being
shifted/scrolled up/down within its window.

For the occasions that I want to shift the buffer I have keys like zz
to do this manually. I don't want this to happen automatically. Is there
any way to avoid this automatic shifting that I'm talking about?

--Matt

P.S. There is a shift that frequently happens when closing the second to
last tabpage. The last line of the newly active window will scroll to
the bottom line of the window.


Expansion of ${!x*} and [EMAIL PROTECTED]

2006-11-05 Thread Linda W

The manpages for my bash's (3.1.11 on Linux and 3.1.17 on cygwin/i686),
under Parameter Expansion, has:


${!prefix*}
[EMAIL PROTECTED]
   Expands to the names of variables whose names begin with prefix,
   separated by the first character of the IFS special variable.

---
From this, I'd expect both forms to have the same output. 
Is this what is intended and what I should expect?


For test purposes, I set:
  IFS= OFS=   # (also set Output FS to see if it is used
#  in the output of 'echo')
---
I used 4 tests, all with prefix=U, 1st pair unquoted, 2nd pair quoted.
input:
  echo ' * ' =  ${!U*}; \ # (line 1 - * unquoted)
  echo ' @ ' =  [EMAIL PROTECTED]; \ # (line 2 - @ unquoted)
  echo '*' = ${!U*}   ; \ # (line 3 - * quoted)
  echo '@' = [EMAIL PROTECTED]   # (line 4 - @ quoted)
---
output:
   *  = UID USER  # (line 1)
   @  = UID USER  # (line 2)
  * = UIDUSER  # (line 3)
  @ = UID USER  # (line 4)
---

QUESTIONS continued...
- If the two forms are supposed to be identical, why aren't lines
  3  4 the same?
- Why do the quotes in line 3 make for different output than in line
Why aren't the 4 lines identical?  I see the IFS,  in line 3, but
not in lines 1,24.  Why isn't it in all 4 lines and, also, even 
the double quotes make a difference when expanding variables, why

aren't lines 34 the same?