"\<Plug>" =~# "\<Plug>" => 0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"\<Plug>" =~# "\<Plug>" => 0

tyru-2
Hi list.

I tested this code on vim73.
:echo "\<Plug>" =~# "\<Plug>"    => 0

Is this right behavior?


My :version is:

VIM - Vi IMproved 7.3 BETA (2010 May 15, compiled Jun 10 2010
18:03:10)
Compiled by tyru@tyru-linux
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
+cmdline_info +comments +conceal +cryptv +cscope +cursorbind
+cursorshape
+dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval
+ex_extra +extra_search +farsi +file_in_path +find_in_path +float
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
+localmap +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec
+mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -
osfiletype +path_extra +perl +persistent_undo +postscript +printer
+profile +python +quickfix +reltime +rightleft +ruby +scrollbind
+signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white -tcl +terminfo
+termresponse +textobjects +title +toolbar +user_commands +vertsplit
+virtualedit
 +visual +visualextra +viminfo +vreplace +wildignore +wildmenu
+windows +writebackup +X11 -xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/home/tyru/local/vim/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -
D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/
include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/
include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/
usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/
include     -g -O2 -D_FORTIFY_SOURCE=1    -D_REENTRANT -D_GNU_SOURCE -
DDEBIAN  -I/usr/local/include -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.10/CORE  -I/usr/include/
python2.6  -I/usr/lib/ruby/1.8/i486-linux -DRUBY_VERSION=18  -pthread
Linking: gcc   -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-
dynamic  -Wl,-E   -L/usr/local/lib -o vim   -lgtk-x11-2.0 -lgdk-
x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -
lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -
lgmodule-2.0 -lglib-2.0   -lXt -lncurses -lselinux  -lacl -lgpm   -Wl,-
E  -L/usr/local/lib  -L/usr/lib/perl/5.10/CORE -lperl -L/usr/lib/
python2.6/config -lpython2.6 -lutil -Xlinker -export-dynamic -Wl,-O1 -
Wl,-Bsymbolic-functions  -lruby1.8 -lrt -lm

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "\<Plug>" =~# "\<Plug>" => 0

Bram Moolenaar

Tyru Exe wrote:

> Hi list.
>
> I tested this code on vim73.
> :echo "\<Plug>" =~# "\<Plug>"    => 0
>
> Is this right behavior?

Yes, using "\<Plug>" as a regexp will give unpredictable behavior.
It's not a valid pattern.

--
Back up my hard drive?  I can't find the reverse switch!

 /// Bram Moolenaar -- [hidden email] -- 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    ///

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "\<Plug>" =~# "\<Plug>" => 0

Peter Odding-3
In reply to this post by tyru-2
Hi again tyru,

In case you didn't know / haven't found it yet, you can use the stridx()
function instead: stridx("foo \<Plug> bar", "\<Plug>") >= 0 evaluates to
true.

  - Peter Odding

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "\<Plug>" =~# "\<Plug>" => 0

tyru-2
In reply to this post by Bram Moolenaar
I see.
Thanks Bram, Peter.

On Jul 11, 9:16 pm, Bram Moolenaar <[hidden email]> wrote:

> Tyru Exe wrote:
> > Hi list.
>
> > I tested this code on vim73.
> > :echo "\<Plug>" =~# "\<Plug>"    => 0
>
> > Is this right behavior?
>
> Yes, using "\<Plug>" as a regexp will give unpredictable behavior.
> It's not a valid pattern.
>
> --
> Back up my hard drive?  I can't find the reverse switch!
>
>  /// Bram Moolenaar -- [hidden email] --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   ///

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Loading...