Macros with Yankring

142 views
Skip to first unread message

Paul

unread,
Dec 10, 2012, 11:07:39 AM12/10/12
to vim...@googlegroups.com
When I run a macro that uses f,t,F, or T, a “YR:Enter character:” prompt pops up with “Press ENTER or type command to continue” beneath it. When I press enter, the macro completes and I’m back to normal. Had I ran the macro a number of times, eg., “10@o” for a macro recorded in the ‘o’ register, the prompt would only shows up once, before all ten iterations are performed.

I read a related thread¹ that says something about having mapped something to the macro trigger (“@q”), which is why I used ‘o’ in my example, since “:verbose map o” shows nothing, and “:verbose map p”, for example, shows yankring has mapped it. Regardless of whether I use ‘o’ or 'p’, the same behaviour exhibits. Is there a yankring setting I need to have to stop it prompting?

¹ https://groups.google.com/forum/?fromgroups=#!topic/vim_use/oDtQ1UTMX90

--

.

David Fishburn

unread,
Dec 13, 2012, 11:37:34 AM12/13/12
to vim_use



On Mon, Dec 10, 2012 at 11:07 AM, Paul <googl...@rainslide.net> wrote:
When I run a macro that uses f,t,F, or T, a “YR:Enter character:” prompt pops up with “Press ENTER or type command to continue” beneath it. When I press enter, the macro completes and I’m back to normal. Had I ran the macro a number of times, eg., “10@o” for a macro recorded in the ‘o’ register, the prompt would only shows up once, before all ten iterations are performed.


Thanks for the report Paul.

Another user just reported the same, though I cannot reproduce it.
Could you send me a picture of what you are seeing to dfishburn dot vim at gmail dot com.
Could you also send me the output of the following commands:
:ver
:set

I assume you are using YankRing 14.0.
Which OS are you on?
Are you using the GUI version?

Thanks,
David

Andrew Ritchie

unread,
Jul 10, 2013, 8:04:26 PM7/10/13
to vim...@googlegroups.com
Hey,

I see this is an old thread but I had the same issue in MacVim using yankring with macros. I am using yankring 17.0, vim 7.3.646 & Mac OS 10.7.5.

Any idea what the problem could be?

Here are the command outputs you asked for:

:ver
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 6 2012 09:46:37)
MacOS X (unix) version
Included patches: 1-646
Compiled by Douglas Drumond <dou...@drumond19.com>
Huge version with MacVim 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() +fullscreen -gettext -hangul_input +iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse
+mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte
+multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -python3
+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 +transparency +user_commands +vertsplit
+virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp
-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: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g
-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -L. -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa
-fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python
-framework Ruby

:set
--- Options ---
autoread helplang=en langmenu=none number smartcase
background=dark hlsearch laststatus=2 ruler tabstop=2
expandtab ignorecase list scroll=20 nowrap
guitablabel=%M%t incsearch mouse=a shiftwidth=2
backspace=indent,eol,start
backupdir=~/.vim/_backup//,.,~/tmp,~/
directory=~/.vim/_temp//,.,~/tmp,/var/tmp,/tmp
fileencodings=ucs-bom,utf-8,default,latin1
guifont=Source Code Pro:h16
listchars=tab: ,trail:.,extends:>,precedes:<
printexpr=system('open -a Preview '.v:fname_in) + v:shell_error
runtimepath=~/.vim/janus/vim/core/before,~/.vim/janus/vim/core/janus,~/.vim/janus/vim/core/pathogen,~/.vim/janus/vim/colors/getafe,~/.v
im/janus/vim/colors/github,~/.vim/janus/vim/colors/irblack,~/.vim/janus/vim/colors/janus-colors,~/.vim/janus/vim/colors/molokai,~/.vim/ja
nus/vim/colors/pyte,~/.vim/janus/vim/colors/sampler-pack,~/.vim/janus/vim/colors/solarized,~/.vim/janus/vim/colors/tasks,~/.vim/janus/vim
/colors/vividchalk,~/.vim/janus/vim/langs/arduino,~/.vim/janus/vim/langs/clojure,~/.vim/janus/vim/langs/coffeescript,~/.vim/janus/vim/lan
gs/csv,~/.vim/janus/vim/langs/cucumber,~/.vim/janus/vim/langs/erlang,~/.vim/janus/vim/langs/git,~/.vim/janus/vim/langs/haml,~/.vim/janus/
vim/langs/handlebars,~/.vim/janus/vim/langs/haskell,~/.vim/janus/vim/langs/javascript,~/.vim/janus/vim/langs/less,~/.vim/janus/vim/langs/
markdown,~/.vim/janus/vim/langs/minitest,~/.vim/janus/vim/langs/nodejs,~/.vim/janus/vim/langs/puppet,~/.vim/janus/vim/langs/rails,~/.vim/
janus/vim/langs/rspec,~/.vim/janus/vim/langs/ruby,~/.vim/janus/vim/langs/scala
statusline=%f %m %rLine:%l/%L[%p%%]Col:%vBuf:#%n[%b][0x%B]
termencoding=utf-8
wildignore=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem,*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*/vendor/gems/*,*/vendor/cache/*
,*/.bundle/*,*/.sass-cache/*,*.swp,*~,._*

David Fishburn

unread,
Jul 15, 2013, 1:10:43 PM7/15/13
to vim_use
Thanks for the email Andrew.

I am a bit too busy at the moment to look at this (trying to release some of my other plugins) but I will come back to it.

David
 

Andrew Ritchie

unread,
Jul 15, 2013, 2:15:48 PM7/15/13
to vim...@googlegroups.com
Thanks for the message. Any chance you could share with me where you would start looking for the issue? I could investigate myself with a solid starting point. 


--
--
You received this message from the "vim_use" 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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/UmsmP70eetU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

David Fishburn

unread,
Jul 15, 2013, 2:56:12 PM7/15/13
to vim_use
... rearranged to use bottom posting as the list strongly prefers  ...
Please bottom post when replying to vim_use.
When Paul and I looked into this issue this is where we made it to.

From Paul:
I found that this only happens when my ‘TERM’ env var is ‘xterm-256color’, when it’s just ‘xterm’ or ‘linux’, yankring doesn’t have a problem. 


My next question was:
With cmdheight = 1 and your xterm set to xterm-26color can you tell me what
happens when you run this command:

:let msg = "Enter character:" | echo msg | let c = getchar() | let c =
nr2char(c) | echon c


The expected output with the above command is:
Enter character:j

What Paul got was:
Enter  character:
j
Press Enter or type command to continue


So, Vim has some sort of bug on some terminal settings.

Christian began to look into this but never made it far.


So Paul had 2 work arounds:
1.  Set TERM=xterm
or
2.  set cmdheight=2

He was running on:

Linux, Slackware current and Debian Squeeze 6.0.6.

I was eventually able to reproduce this on stock Ubuntu 12.04 by making my screen width smaller than the command:
     :let msg = "Enter character:" | echo msg | let c = getchar() | let c = nr2char(c) | echon c


Hmm, I just tried this on my Windows machine and I also get the "Press ENTER ..." prompt.

Can you confirm any of this?

Thanks,
David
 

Reply all
Reply to author
Forward
0 new messages