Le mardi 2 décembre 2014 12:00:30 UTC+1, jott...@googlemail.com a écrit : > Hi > > Enno schrieb am 02.12.2014 um 11:39: > > Le mardi 2 décembre 2014 11:38:10 UTC+1, Enno a écrit : > >> Le mardi 2 décembre 2014 10:44:13 UTC+1, jott...@googlemail.com a écrit : > >>> Hi, > >>> > >>> Enno schrieb am 02.12.2014 um 10:06: > >>>> Le lundi 1 décembre 2014 20:42:50 UTC+1, v...@googlecode.com a écrit : > >>>>> Comment #3 on issue 290 by chrisbr...@googlemail.com: gVim does not > >>>>> jump to > >>>>> given linennumber if already at end of file > >>>>> https://code.google.com/p/vim/issues/detail?id=290 > >>>>> > >>>>> Vim 7.4 works correctly with +[<number>] here (if no number is given, > >>>>> Vim > >>>>> jumps to the last line number). I cannot reproduce the problem. Does it > >>>>> > >>>>> happen if you start vim -u NONE -N +2 > >>>>> ? > >>>> > >>>> Let me provide exact instructions. Create an empty file ~/.gvimrc.light > >>>> . and a file ~/.vimrc.light that reads > >>>> > >>>> set nocompatible > >>>> filetype plugin indent on > >>>> syntax enable > >>>> > >>>> Then create a file ~/file.txt that reads > >>>> > >>>> a > >>>> b > >>>> c > >>>> d > >>>> e > >>>> > >>>> Then > >>>> > >>>> gvim --servername GVIM2 +5 file.txt > >>>> gvim --servername GVIM2 --remote-send +1 file.txt > >>>> > >>>> Expected: Cursor is in line 1. Reality: Cursor is in line 5. > >>> > >>> independent of the corrections you sent later this will not work. When > >>> you take a look at > >>> > >>> :help --remote-send > >>> > >>> you will see that --remote-send is used to send keystrokes to a running > >>> instance of Vim. The following parameter is interpreted as if you typed > >>> the respective keys in Vim by yourself. > >>> > >>> In your example one correct command line would be > >>> > >>> gvim --servername GVIM2 --remote-send ":1<cr> file.txt > >>> > >>> if you want to use an ex-command. > >>> > >>> A different way would be > >>> > >>> gvim --servername GVIM2 --remote-send 1gg file.txt > >>> > >>> which uses a normal mode command. > >>> > >>> Regards, > >>> Jürgen > >>> > >>> > >>> -- > >>> Sometimes I think the surest sign that intelligent life exists elsewhere > >>> in the universe is that none of it has tried to contact us. (Calvin) > >> > >> Ok. Thank you for the clarification. It turns out that the harmless > >> looking map > >> > >> cnoremap <expr> / getcmdtype() == '/' ? '\/' : '/' > >> > >> to escape / in command line searches was the culprit and turned exe into > >> normal commands. That is: > >> > >> Create an empty file ~/.gvimrc.light . and a file ~/.vimrc.light that > >> reads > >> > >> -- > >> set nocompatible > >> filetype plugin indent on > >> syntax enable > >> > >> cnoremap <expr> / getcmdtype() == '/' ? '\/' : '/' > >> -- > >> > >> Then create a file ~/file.txt that reads > >> > >> -- > >> a > >> b > >> c > >> d > >> e > >> -- > >> > >> Then > >> > >> gvim --servername GVIM2 +5 file.txt > >> gvim --servername GVIM2 +1 file.txt > >> > >> Expected: Cursor is in line 1. Reality: Cursor is in line 5. > > > > CORRECTION: Replace > > > > gvim --servername GVIM2 +5 file.txt > > gvim --servername GVIM2 +1 file.txt > > > > by > > > > gvim -n -u ~\.vimrc.light -U ~\.gvimrc.light --servername GVIM2 +5 file.txt > > gvim -n -u ~\.vimrc.light -U ~\.gvimrc.light --servername GVIM2 +1 file.txt > > > > that won't work either. Using --servername without any of the --remote > commands tries to start another instance of Vim as a server with the > given name. If the name is already taken by an instance started before, > "1", "2", "3", etc. is appended to the server name until an unused name > is found. So your second command line will start a new instance of GVim > and its server name will be "GVIM21" (given that no server "GVIM2" was > running before your two example commands). > > Regards, > Jürgen > > -- > Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us. (Calvin)
Thank you Jürgen. It indeed hinges on the editexisting plugin. The following .vimrc.light should reproduce the issue: == set nocompatible filetype plugin indent on syntax enable runtime! macros/editexisting.vim cnoremap <expr> / getcmdtype() == '/' ? '\/' : '/' nnoremap : , == Both mappings are necessary to confuse Vim. -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.