Re: clientserver --remote-send and map
Yakov Lerner wrote: On Fri, May 23, 2008 at 7:54 PM, Philippe Fremy [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Tony Mechelynck wrote: On 22/05/08 15:52, Philippe Fremy wrote: [...] The conclusion seems pretty clear: mapping code is not executed when sending keys through --remote-send. Is that a bug ? [...] I believe it is not a bug, by analogy to the following: *remote_send()* *E241* remote_send({server}, {string} [, {idvar}]) Send the {string} to {server}. The string is sent as input keys and the function returns immediately. At the Vim server the keys are not mapped |:map|. etc. I see. Philippe, Try this: vim --remote-expr 'feedkeys(\F4)' :help feedkeys() Thanks. It works, but it is not portable, so that's not enough for me. But anyway, I can go without mapping support in --remote-send, if I am aware of it. cheers, Philippe --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
Try this: vim --remote-expr 'feedkeys(\F4)' :help feedkeys() Thanks. It works, but it is not portable, so that's not enough for me. But anyway, I can go without mapping support in --remote-send, if I am aware of it. Not portable?! Why not? Ben. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
Ben Schmidt wrote: Try this: vim --remote-expr 'feedkeys(\F4)' :help feedkeys() Thanks. It works, but it is not portable, so that's not enough for me. But anyway, I can go without mapping support in --remote-send, if I am aware of it. Not portable?! Why not? My mistake, I checked many things and actually read the help of the ole version, which is named SendKeys. So it is portable indeed, thanks a lot. cheers, Philippe --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
Tony Mechelynck wrote: On 22/05/08 15:52, Philippe Fremy wrote: [...] The conclusion seems pretty clear: mapping code is not executed when sending keys through --remote-send. Is that a bug ? [...] I believe it is not a bug, by analogy to the following: *remote_send()* *E241* remote_send({server}, {string} [, {idvar}]) Send the {string} to {server}. The string is sent as input keys and the function returns immediately. At the Vim server the keys are not mapped |:map|. etc. I see. The documentation ought to be a bit more explicit about this. cheers, Philippe --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
On Fri, May 23, 2008 at 7:54 PM, Philippe Fremy [EMAIL PROTECTED] wrote: Tony Mechelynck wrote: On 22/05/08 15:52, Philippe Fremy wrote: [...] The conclusion seems pretty clear: mapping code is not executed when sending keys through --remote-send. Is that a bug ? [...] I believe it is not a bug, by analogy to the following: *remote_send()* *E241* remote_send({server}, {string} [, {idvar}]) Send the {string} to {server}. The string is sent as input keys and the function returns immediately. At the Vim server the keys are not mapped |:map|. etc. I see. Philippe, Try this: vim --remote-expr 'feedkeys(\F4)' :help feedkeys() Yakov --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
On Wed, May 21, 2008 at 6:49 PM, Philippe Fremy [EMAIL PROTECTED] wrote: Hi, I am playing with --remote-send. I have the following problem: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send :map F4 icoucouLTCRLTESCjCR This sets the function key F4 to do icoucouCRESCj, i.e. insert coucou + end of line, return to normal mode and go one line down. After it has been executed, it works if I press the F4 function key. However: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send F4 does strictly nothing. Use are sending 4 characters here, '', 'F', '4', ''. Ask on vim_use forums for the solution. Yakov --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
On 22/05/08 08:51, Yakov Lerner wrote: On Wed, May 21, 2008 at 6:49 PM, Philippe Fremy[EMAIL PROTECTED] wrote: Hi, I am playing with --remote-send. I have the following problem: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send :mapF4 icoucouLTCRLTESCjCR This sets the function keyF4 to do icoucouCRESCj, i.e. insert coucou + end of line, return to normal mode and go one line down. After it has been executed, it works if I press theF4 function key. However: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send F4 does strictly nothing. Use are sending 4 characters here, '', 'F', '4',''. Ask on vim_use forums for the solution. Yakov To use notation in a quoted string (unlike its use in a mapping definition), an escaping backslash must be used. Try --remote-send \F4 (with of course no space between --remote and -send). Best regards, Tony. -- America is a large, friendly dog in a very small room. Every time it wags its tail, it knocks over a chair. -- Arnold Joseph Toynbee --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
Tony Mechelynck wrote: On 22/05/08 08:51, Yakov Lerner wrote: On Wed, May 21, 2008 at 6:49 PM, Philippe Fremy[EMAIL PROTECTED] wrote: Hi, I am playing with --remote-send. I have the following problem: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send :mapF4 icoucouLTCRLTESCjCR This sets the function keyF4 to do icoucouCRESCj, i.e. insert coucou + end of line, return to normal mode and go one line down. After it has been executed, it works if I press theF4 function key. However: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send F4 does strictly nothing. Use are sending 4 characters here, '', 'F', '4',''. Ask on vim_use forums for the solution. Yakov To use notation in a quoted string (unlike its use in a mapping definition), an escaping backslash must be used. Try --remote-send \F4 (with of course no space between --remote and -send). No, using in quoted string works at least for some keys. For example, CR, ESC and LT are correctly transformed into one keypress. I made two other tests. If I switch to insert mode, I can see what keypress I receive: cmd: gvim --servername HOP --remote-send F4 inserted text: F4 cmd: gvim --servername HOP --remote-send LTF4 inserted text: F4 cmd: gvim --servername HOP --remote-send \F4 -- nothing inserted text: \F4 cmd: gvim --servername HOP --remote-send \\F4 -- nothing inserted text: \\F4 Then I made a more simple test: :imap x hopCR In insert mode, if I press x, the mapping is executed, hop is inserted. If I use gvim --servername HOP --remote-send x, the mapping is not executed and x is inserted. The conclusion seems pretty clear: mapping code is not executed when sending keys through --remote-send. Is that a bug ? It happens with both the official version and my self-compiled version. self-compiled: VIM - Vi IMproved 7.1 (2007 May 12, compiled Apr 7 2008 09:34:24) MS-Windows 32 bit GUI version Included patches: 1-285 Official: VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39) MS-Windows 32 bit GUI version with OLE support Compiled by [EMAIL PROTECTED] Big version with GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -postscript +printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32 system vimrc file: $VIM\vimrc user vimrc file: $HOME\_vimrc 2nd user vimrc file: $VIM\_vimrc user exrc file: $HOME\_exrc 2nd user exrc file: $VIM\_exrc system gvimrc file: $VIM\gvimrc user gvimrc file: $HOME\_gvimrc 2nd user gvimrc file: $VIM\_gvimrc system menu file: $VIMRUNTIME\menu.vim Compilation: cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYTR/ /Ox -DNDEBUG -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\tcl83.dll\ -DDYNAMIC_TCL_VER=\8.3\ -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\python24.dll\ -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=18 -DDYNAMIC_RUBY_DLL=\msvcrt-ruby18.dll\ -DFEAT_BIG /Zi /Fd.\ObjGOLYTR/ Linking: link /RELEASE /nologo /subsystem:windows /incremental:no /nodefaultlib:libc advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib oldnames.lib kernel32.lib gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:python24.lib e:\tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug regards, Philippe --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: clientserver --remote-send and map
On 22/05/08 15:52, Philippe Fremy wrote: [...] The conclusion seems pretty clear: mapping code is not executed when sending keys through --remote-send. Is that a bug ? [...] I believe it is not a bug, by analogy to the following: *remote_send()* *E241* remote_send({server}, {string} [, {idvar}]) Send the {string} to {server}. The string is sent as input keys and the function returns immediately. At the Vim server the keys are not mapped |:map|. etc. Best regards, Tony. -- Give me a Plumber's friend the size of the Pittsburgh dome, and a place to stand, and I will drain the world. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
clientserver --remote-send and map
Hi, I am playing with --remote-send. I have the following problem: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send :map F4 icoucouLTCRLTESCjCR This sets the function key F4 to do icoucouCRESCj, i.e. insert coucou + end of line, return to normal mode and go one line down. After it has been executed, it works if I press the F4 function key. However: d:\work\vimWrapper\vimWrapper1\pyvimwrapper\testsgvim --servername HOP --remote -send F4 does strictly nothing. Is the map feature skipped when interpreting --remote-send ? cheers, Philippe --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---