Invoke _gvimrc.vim / unexpected expansions

2006-08-11 Thread jandl
Dear colleagues,
I have 2 problems with gvim

1/ when I start gvim in Windows XP (double click on icon), gvim opens without 
invoking the _gvimrc.vim. I have _gvimrc.vim located in c:\programs\vim. I have 
also tried to put _gvimrc.vim into c:\programs\vim\vim70 but it was not 
automatically started from there either.

2/ I am using gvim for edition my latex files and have the Latex-Suite as an 
add-in. That has generated some conflict: whenever I press a '.' I get 
'C-R=SIDSmartDots()CR'.

Here is my _gvimrc.vim:
 An example for a gvimrc file.
 The commands in this are executed when the GUI is started.

 Maintainer:   Bram Moolenaar [EMAIL PROTECTED]
 Last change:  2001 Sep 02

 To use it, copy it to
 for Unix and OS/2:  ~/.gvimrc
 for Amiga:  s:.gvimrc
  for MS-DOS and Win32:  $VIM\_gvimrc
   for OpenVMS:  sys$login:.gvimrc

 Make external commands work through a pipe instead of a pseudo-tty
set noguipty

 set the X11 font to use
 set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

set ch=2 Make command line two lines high

set mousehideHide the mouse when typing text

 Make shift-insert work like in Xterm
map S-Insert MiddleMouse
map! S-Insert MiddleMouse

 Only do this for Vim version 5.0 and later.
if version = 500

   I like highlighting strings inside C comments
  let c_comment_strings=1

   Switch on syntax highlighting if it wasn't on yet.
  if !exists(syntax_on)
syntax on
  endif

   Switch on search pattern highlighting.
  set hlsearch

   For Win32 version, have K lookup the keyword in a help file
  if has(win32)
let winhelpfile='windows.hlp'
map K :execute !start winhlp32 -k cword  . winhelpfile CR
  endif

   Set nice colors
   background for normal text is light grey
   Text below the last line is darker grey
   Cursor is green, Cyan when :lmap mappings are active
   Constants are not underlined but have a slightly lighter background
  highlight Normal guibg=grey90
  highlight Cursor guibg=Green guifg=NONE
  highlight lCursor guibg=Cyan guifg=NONE
  highlight NonText guibg=grey80
  highlight Constant gui=NONE guibg=grey95
  highlight Special gui=NONE guibg=grey95

endif

 Begin LatexSuite
 REQUIRED. This makes vim invoke latex-suite when you open a tex file.
filetype plugin on

 IMPORTANT: win32 users will need to have 'shellslash' set so that latex
 can be called correctly.
set shellslash

 IMPORTANT: grep will sometimes skip displaying the file name if you
 search in a singe file. This will confuse latex-suite. Set your grep
 program to alway generate a file-name.
set grepprg=grep\ -nH\ $*

 OPTIONAL: This enables automatic indentation as you type.
filetype indent on
 End LatexSuite


 set guifont=SAS_Monospace:h11  rja
 -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

set ch=2 Make command line two lines high

set mousehideHide the mouse when typing text

set ai
set textwidth=100
set wm=10

set history=50

set ruler 
set cp!

set showcmd

map F5 i{Escea}Esc

 Make shift-insert work like in Xterm
map S-Insert MiddleMouse
map! S-Insert MiddleMouse
map! #n \~{n}
map! #a \'{a}
map! #A \'{A}
map! #e \'{e}
map! #E \'{E}
map! #i \'{\i}
map! #o \'{o}
map! #O \'{O}
map! #u \'{u}
map! #U \'{U}

map! 14c $^{14}$C

 Only do this for Vim version 5.0 and later.
if version = 500

   I like highlighting strings inside C comments
  let c_comment_strings=1

   Switch on syntax highlighting if it wasn't on yet.
  if !exists(syntax_on)
syntax on
  endif

   Switch on search pattern highlighting.
  set hlsearch

   For Win32 version, have K lookup the keyword in a help file
  if has(win32)
let winhelpfile='windows.hlp'
map K :execute !start winhlp32 -k cword  . winhelpfile CR
  endif

  



*
Robert Jandl, Univ-Doz, Dipl.-Ing. Dr
Bundesforschungs- und Ausbildungszentrum
für Wald, Naturgefahren und Landschaft (BFW)
Seckendorff Gudent Weg 8
A-1131 Wien, Österreich
Tel +43 1 87838 1302
FAX +43 1 87838 1250
cell phone +43 664 826 99 07
*
**
 


Re: Invoke _gvimrc.vim / unexpected expansions

2006-08-11 Thread James Vega
On Fri, Aug 11, 2006 at 08:43:10AM +0200, jandl wrote:
 Dear colleagues,
 I have 2 problems with gvim
 
 1/ when I start gvim in Windows XP (double click on icon), gvim opens
 without invoking the _gvimrc.vim. I have _gvimrc.vim located in
 c:\programs\vim. I have also tried to put _gvimrc.vim into
 c:\programs\vim\vim70 but it was not automatically started from there
 either.
 
 2/ I am using gvim for edition my latex files and have the Latex-Suite
 as an add-in. That has generated some conflict: whenever I press a '.'
 I get 'C-R=SIDSmartDots()CR'.
 
 Here is my _gvimrc.vim:
 [snip]
  To use it, copy it to
  for Unix and OS/2:  ~/.gvimrc
for Amiga:  s:.gvimrc
   for MS-DOS and Win32:  $VIM\_gvimrc

As your _gvimrc says, there should be no .vim extension on your
_gvimrc (or _vimrc). :)  That will fix 1).

As for 2), you may have to edit the plugin to change that mapping so it
doesn't override a normal Vim command.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Patch 7.0.051

2006-08-11 Thread Bram Moolenaar

Patch 7.0.051 (after 7.0.44)
Problem:The Perl interface doesn't compile or doesn't work properly.
Solution:   Remove the spaces before #ifdef and avoid an empty line above it.
Files:  src/if_perl.xs


*** ../vim-7.0.050/src/if_perl.xs   Tue Aug  8 16:47:38 2006
--- src/if_perl.xs  Fri Aug 11 22:51:01 2006
***
*** 1068,1098 
line = SvPV(ST(i),PL_na);
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
{
! #ifdef FEAT_AUTOCMD
aco_save_T  aco;
  
/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
buf_T   *save_curbuf = curbuf;
  
curbuf = vimbuf;
curwin-w_buffer = vimbuf;
! #endif
if (u_savesub(lnum) == OK)
{
ml_replace(lnum, (char_u *)line, TRUE);
changed_bytes(lnum, 0);
}
! 
! #ifdef FEAT_AUTOCMD
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
! #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
! #endif
}
}
  }
--- 1068,1097 
line = SvPV(ST(i),PL_na);
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
{
! #ifdef FEAT_AUTOCMD
aco_save_T  aco;
  
/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
buf_T   *save_curbuf = curbuf;
  
curbuf = vimbuf;
curwin-w_buffer = vimbuf;
! #endif
if (u_savesub(lnum) == OK)
{
ml_replace(lnum, (char_u *)line, TRUE);
changed_bytes(lnum, 0);
}
! #ifdef FEAT_AUTOCMD
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
! #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
! #endif
}
}
  }
***
*** 1130,1144 
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count)
{
buf_T   *save_curbuf = curbuf;
! #ifdef FEAT_AUTOCMD
aco_save_T  aco;
  
/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
curbuf = vimbuf;
curwin-w_buffer = vimbuf;
! #endif
if (u_savedel(lnum, 1) == OK)
{
ml_delete(lnum, 0);
--- 1129,1143 
if (lnum  0  lnum = vimbuf-b_ml.ml_line_count)
{
buf_T   *save_curbuf = curbuf;
! #ifdef FEAT_AUTOCMD
aco_save_T  aco;
  
/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
curbuf = vimbuf;
curwin-w_buffer = vimbuf;
! #endif
if (u_savedel(lnum, 1) == OK)
{
ml_delete(lnum, 0);
***
*** 1146,1159 
if (save_curbuf == curbuf)
check_cursor();
}
! #ifdef FEAT_AUTOCMD
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
! #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
! #endif
update_curbuf(VALID);
}
}
--- 1145,1158 
if (save_curbuf == curbuf)
check_cursor();
}
! #ifdef FEAT_AUTOCMD
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(aco);
/* Careful: autocommands may have made vimbuf invalid! */
! #else
curwin-w_buffer = save_curbuf;
curbuf = save_curbuf;
! #endif
update_curbuf(VALID);
}
}
***
*** 1180,1210 
line = SvPV(ST(i),PL_na);
if (lnum = 0  lnum = vimbuf-b_ml.ml_line_count  line != NULL)
{
! #ifdef FEAT_AUTOCMD
aco_save_T  aco;
  
/* set curwin/curbuf for vimbuf and save some things */
aucmd_prepbuf(aco, vimbuf);
! #else
buf_T   *save_curbuf = curbuf;
  
curbuf = vimbuf;
  

Vim updates

2006-08-11 Thread Ali Akcaagac
Hello Bram,

On my home Linux system I can easily compile and install every patch you
release for Vim, same applies for the MorphOS versions that I from time
to time create and release for our users but for Windows - which I need
to use at work - I am stuck with the *.exe setup files as found on
vim.org and thus can not test updates to report back problems or give
feedback. Now the patchlevel has reached .051.

Is there by any chance a way to release full binary setup snapshots of
vim ? Say is there a way or automate process that might generate a setup
say once a week and put it up on vim.org ?

mfg,

Ali Akcaagac




RE: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-11 Thread Bram Moolenaar

 Bram, you have an overflow in your signature :)

  --
  hundred-and-one symptoms of being an internet addict:
  102. When filling out your driver's license application, you give
   your IP address.

hundred-and-one symptoms of being an internet addict:
256. You are able to write down over 250 symptoms of being an internet
 addict, even though they only asked for 101.

-- 
FIXME and XXX are two common keywords used to mark broken or incomplete code
not only since XXX as a sex reference would grab everbodys attention but
simply due to the fact that Vim would highlight these words.
-- Hendrik Scholz

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: failure notice

2006-08-11 Thread Bram Moolenaar

Edward L. Fox wrote:

 Sorry for sending this mail for the second time because my previous
 mail with attachment was rejected by the mail daemon. :-(
 
 On 8/11/06, Bram Moolenaar [EMAIL PROTECTED] wrote:
 
  [...]
 
  The menu.vim file should never change 'encoding'.  It should load menus
  that are appropriate for the current 'encoding' and language.
 
 But gvim doesn't support an encoding named 'gbk'. If the system
 encoding is 'gbk', the menu and toolbar get malformed.

What do you mean by system encoding?  How does Vim see this?

 In the past two by system encoding?  How does Vim see this?  years
 (or more), all gvim users in mainland China should add the following
 two lines in their .vimrc if they are using Linux with GBK encoding:
 
 set enc=cp936
 so $VIMRUNTIME/delmenu.vim
 so $VIMRUNTIME/menu.vim
 
 That's why I had wanted to change the encoding value in menu.vim. :-)
 
  If the intention is to have the default for 'encoding' use something
  specific in $LANG then this must be done in enc_locale() in src/mbyte.c
 
 I modified mbyte.c, added gbk as an alias of cp936, then the
 menubar was displayed properly with the unmodified menu.vim. But there
 is still some problem with the toolbar - every last character of the
 tooltip becomes two question marks. I'm trying to debug the code and
 will send you another patch as soon as I solve the problem. Hope you
 can offer me some hints, too. :-)

You may have uncovered a bug that went unnoticed so far.  Please try to
discover what causes this problem.  I can't guess why the last character
is messed up, looks strange.

-- 
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
 to the teacher you were stuck in Web traffic.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-11 Thread mwoehlke

Bram Moolenaar wrote:

hundred-and-one symptoms of being an internet addict:
256. You are able to write down over 250 symptoms of being an internet
 addict, even though they only asked for 101.


So where is the complete list? ;-)


FIXME and XXX are two common keywords used to mark broken or incomplete code
not only since XXX as a sex reference would grab everbodys attention but
simply due to the fact that Vim would highlight these words.
-- Hendrik Scholz


...and those of us that use KATE (I use VIM for one-off edits, and when 
I'm not working on my local box) simply edit alerts.xml :-)


--
Matthew
We're all mad here. I'm mad. You're mad... You must be, or you wouldn't 
have come here. -- The Cheshire Cat




Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux

2006-08-11 Thread Yakov Lerner

On 8/12/06, mwoehlke [EMAIL PROTECTED] wrote:

Bram Moolenaar wrote:
 hundred-and-one symptoms of being an internet addict:
 256. You are able to write down over 250 symptoms of being an internet
  addict, even though they only asked for 101.

So where is the complete list? ;-)


I believe the list can't be complete because people
invent new ways of internet addiction every day.

258. You are subscribed to mailing list for every
piece of software you use.

259. You collect hilarious signatures from all
250 mailing lists you are subscribed to.

Yakov