some patch and a question :-)
  1. add /wd4819 flags to cl compiler (vc2008), avoid the warnings when the
     source-file has charactor out of ascii (ascii.h, line 
126 the '?', can
     change it into '\xA3' ??)
&nbsp; 2. FuncUndefined autocmd's <amatch> is the function name, but it expanded
&nbsp;&nbsp;&nbsp;&nbsp; into the full-path, so add EVENT_FUNCUNDEFINED to 
avoid it.
&nbsp; 3. add @echo off and @echo on to msvc2008.bat to make output bueatifull a
&nbsp;&nbsp;&nbsp;&nbsp; little.
&nbsp; 4. add a (unsigned) to avoid cl's warning.
====
okay, after reading the code of Vim, i'm writing a new vim script syntax
highlight file, but i meet some questions.
if you did this, it works well:
&nbsp;&nbsp;&nbsp; syn match vimLineContinue /\\\n/ contained
&nbsp;&nbsp;&nbsp; syn region vimComment excludenl start='"' end='$' 
contains=vimLineContinue
&nbsp;&nbsp;&nbsp; syn sync fromstart
but, if you use \n but not \\ for start of line continue(just like
vim-script), it worked stranged: 
&nbsp;&nbsp;&nbsp; syn match vimLineContinue /\n\s*\\/ contained
it can't work, and 
&nbsp;&nbsp;&nbsp; syn match vimLineContinue /.\n\s*\\/ contained
worked, but it can't refresh automaticly.
so, my question is: 1. how to implement line-continue correctly (the first
code is right?), 2. how to implement the vim-style line continue??
thanks for attention :-)
&nbsp;
&nbsp;

-------------------------------------------------------------------
新浪空间——与朋友开心分享网络新生活!(http://space.sina.com.cn/ )
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

some patch and a question :-)

  1. add /wd4819 flags to cl compiler (vc2008), avoid the warnings when the
     source-file has charactor out of ascii (ascii.h, line 126 the '£', can
     change it into '\xA3' ??)

  2. FuncUndefined autocmd's <amatch> is the function name, but it expanded
     into the full-path, so add EVENT_FUNCUNDEFINED to avoid it.

  3. add @echo off and @echo on to msvc2008.bat to make output bueatifull a
     little.

  4. add a (unsigned) to avoid cl's warning.

====

okay, after reading the code of Vim, i'm writing a new vim script syntax
highlight file, but i meet some questions.

if you did this, it works well:

    syn match vimLineContinue /\\\n/ contained
    syn region vimComment excludenl start='"' end='$' contains=vimLineContinue
    syn sync fromstart

but, if you use \n but not \\ for start of line continue(just like
vim-script), it worked stranged: 

    syn match vimLineContinue /\n\s*\\/ contained

it can't work, and 

    syn match vimLineContinue /.\n\s*\\/ contained

worked, but it can't refresh automaticly.

so, my question is: 1. how to implement line-continue correctly (the first
code is right?), 2. how to implement the vim-style line continue??

thanks for attention :-)



diff -cr ../vim72-148/src/Make_mvc.mak src/Make_mvc.mak
*** ../vim72-148/src/Make_mvc.mak       Mon Mar 30 19:22:51 2009
--- src/Make_mvc.mak    Sun Mar 29 23:24:07 2009
***************
*** 370,375 ****
--- 370,380 ----
  !error Make aborted.
  !endif
  
+ # disable warnings if vc_ver > 8.0
+ !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
+ CFLAGS = $(CFLAGS) /wd4819
+ !endif # ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0")
+ 
  # Convert processor ID to MVC-compatible number
  !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0")
  !if "$(CPUNR)" == "i386"
diff -cr ../vim72-148/src/fileio.c src/fileio.c
*** ../vim72-148/src/fileio.c   Mon Mar 30 19:23:15 2009
--- src/fileio.c        Mon Mar 30 19:51:14 2009
***************
*** 8784,8791 ****
      else
      {
        sfname = vim_strsave(fname);
!       /* Don't try expanding FileType, Syntax, WindowID or QuickFixCmd* */
        if (event == EVENT_FILETYPE
                || event == EVENT_SYNTAX
                || event == EVENT_REMOTEREPLY
                || event == EVENT_SPELLFILEMISSING
--- 8784,8793 ----
      else
      {
        sfname = vim_strsave(fname);
!       /* Don't try expanding FileType, FuncUndefined,
!          * Syntax, WindowID or QuickFixCmd* */
        if (event == EVENT_FILETYPE
+                 || event == EVENT_FUNCUNDEFINED
                || event == EVENT_SYNTAX
                || event == EVENT_REMOTEREPLY
                || event == EVENT_SPELLFILEMISSING
diff -cr ../vim72-148/src/msvc2008.bat src/msvc2008.bat
*** ../vim72-148/src/msvc2008.bat       Sat Aug  9 18:29:26 2008
--- src/msvc2008.bat    Mon Mar 30 19:40:36 2009
***************
*** 1,5 ****
--- 1,7 ----
+ @echo off
  rem To be used on MS-Windows for Visual C++ 2008 Express Edition
  rem   aka Microsoft Visual Studio 9.0.
  rem See INSTALLpc.txt for information.
  
  call "%VS90COMNTOOLS%%vsvars32.bat"
+ @echo on
Only in src: msvcmk.bat
diff -cr ../vim72-148/src/ops.c src/ops.c
*** ../vim72-148/src/ops.c      Mon Mar 30 19:23:10 2009
--- src/ops.c   Mon Mar 30 19:16:15 2009
***************
*** 495,501 ****
        block_space_width = non_white_col - oap->start_vcol;
        /* We will shift by "total" or "block_space_width", whichever is less.
         */
!       shift_amount = (block_space_width < total? block_space_width: total);
  
        /* The column to which we will shift the text.  */
        destination_col = non_white_col - shift_amount;
--- 495,501 ----
        block_space_width = non_white_col - oap->start_vcol;
        /* We will shift by "total" or "block_space_width", whichever is less.
         */
!       shift_amount = (block_space_width < (unsigned)total? block_space_width: 
total);
  
        /* The column to which we will shift the text.  */
        destination_col = non_white_col - shift_amount;

Raspunde prin e-mail lui