[x] I have searched the issues of this repo and believe that this is not a duplicate
OS version and name: Arch Linux
When opening vim in hyper, the text in my clipboard is automatically pasted as if I pressed p. I encountered this problem after upgrading from 1.4.7 to 2.0.2. I deleted vimrc and replaced .hyper.js with the default one buf it didn't help.
I have the same issue, which is preventing me from using Hyper. This is weird and I'm not really sure how to debug it. If you're on Linux, maybe you can use this script to see exactly which input is getting sent to vim: https://github.com/Baranowski/habit-vim
Unfortunately, I'm on Mac so I can't do that. Note that the same thing happens in macvim, but it does not happen in vi!
I'll take a look at the problem.
I'm using _canary version 2.0.2_ but I do not have that problem. You could detail the steps to execute the bug @DDoSolitary .
This is my vim version, installed through Homebrew:
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 14 2017 18:28:18)
MacOS X (unix) version
Included patches: 1-1100
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminal
++builtin_terms +fork() +multi_lang +terminfo
+byte_offset -gettext -mzscheme +termresponse
+channel -hangul_input +netbeans_intg +textobjects
+cindent +iconv +num64 +timers
-clientserver +insert_expand +packages +title
+clipboard +job +path_extra -toolbar
+cmdline_compl +jumplist +perl +user_commands
+cmdline_hist +keymap +persistent_undo +vertsplit
+cmdline_info +lambda +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape +startuptime -xpm
+eval +mouse_dec +statusline -xsmp
+ex_extra -mouse_gpm -sun_workshop -xterm_clipboard
+extra_search -mouse_jsbterm +syntax -xterm_save
+farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework Cocoa -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.0/lib/perl5/5.26.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.4.2 -lobjc
There must be some discrepancy in vim version, since I'm running on the same Hyper version.
EDIT: Executing vim is enough to see the bug.
I played around a bit more. This doesn't happen in older versions of vim, like the one included with OS X at /usr/bin/vim.
EDIT: This is the version for the OS X vim:
$ /usr/bin/vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 4 2017 18:14:54)
Included patches: 1-898, 8056
Compiled by [email protected]
Normal version without GUI. Features included (+) or not (-):
+acl -farsi -mouse_netterm +syntax
-arabic +file_in_path -mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float -mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
+builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent -gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand -perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info -keymap +postscript +virtualedit
+comments -langmap +printer +visual
-conceal +libcall -profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua -rightleft +windows
+diff +menu +ruby/dyn +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
-emacs_tags -mouseshape -sniff -xsmp
+eval -mouse_dec +startuptime -xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv
@cjhowe7 I have version 7.4 vim. I will update it to try to reproduce the error.
Update: I already have version 8.0, I execute the command vim --version. but it does not present errors.
@cjhowe7 I will try to reproduce this error 馃拑
How did you install it? I can try to compile vim 8.0 myself and see if the error persists.
Well, I went ahead and compiled vim myself. Now, the problem is gone! I guess the Homebrew version of vim/macvim is the source of this problem. Here's my compiled vim's version:
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 23 2017 20:59:20)
MacOS X (unix) version
Included patches: 1-1142
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminal
++builtin_terms +fork() +multi_lang +terminfo
+byte_offset -gettext -mzscheme +termresponse
+channel -hangul_input +netbeans_intg +textobjects
+cindent +iconv +num64 +timers
-clientserver +insert_expand +packages +title
+clipboard +job +path_extra -toolbar
+cmdline_compl +jumplist -perl +user_commands
+cmdline_hist +keymap +persistent_undo +vertsplit
+cmdline_info +lambda +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak -python +viminfo
-cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape +startuptime -xpm
+eval +mouse_dec +statusline -xsmp
+ex_extra -mouse_gpm -sun_workshop -xterm_clipboard
+extra_search -mouse_jsbterm +syntax -xterm_save
+farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa
@cjhowe7 I made the installation by Homebrew. This problem is Homebrew and not version 2.0.2
Alright, so I realized that was a newer version of vim, and I tried to compile the version of vim that Homebrew is on. That caused the problem to reappear! So it seems like this has been fixed in the latest version of vim. I agree that this isn't Hyper's fault, but the version of vim on Homebrew. So, until Homebrew comes out with the latest version of vim, I suggest compiling vim yourself. It's not that hard if you already have Homebrew set up anyways! I think we should close this issue.
@cjhowe7 Which source did you use to compile vim? Master branch or the 8.0 release?
Currently, those are the same thing, but to be exact, you can do the following to get what I compiled:
git clone https://github.com/vim/vim
cd vim
git checkout v8.0.1142
Unfortunately the git repo of vim is really large and I can only do git clone at 20KB/s as I live in China. However, after doing some binary search by hand with the archive of the Arch Linux official package repo , I found out that this problem was introduced between 8.0.0851 and 8.0.0987.
I'm still not sure if it's hyper's fault because the problem doesn't appear if I use other terminal emulators like gnome-terminal or simply a terminal without Xorg.
I don't know if it will help, but maybe you could just download the source as a zip from github directly, without all the history.
EDIT: It seems like it's tiny, so it's definitely worth a try.
$ curl -SO https://github.com/vim/vim/archive/v8.0.1142.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 115 0 115 0 0 537 0 --:--:-- --:--:-- --:--:-- 539
Oh that link works. I can compile vim now. Thank you very much.
I tried to compile different versions of vim and found out that this problem occurs since vim/vim@ce1c32780a7d0ae5110eab627fcbfd4a11e5eb52(8.0.0973) and disappears after vim/vim@e22bbf65088a01b465918919782c19eb291f9cf0(8.0.1128). I don't know what these two commits do because I have little knowledge about terminal-related things.
For me the problem is that the latest version of vim available in the Arch Linux official repo is 8.0.1127. I'll wait for it to be updated because I don't want my system to get messed up with binaries not managed by a package manager.
@DDoSolitary If the problem was solved, it would be convenient to close this post. I already did the verifications and Hyper is not of the conflict with vim :)
Many thanks for this! I had the same issue and just freshly brewed vim 8.0.1250 and the problem is gone. I didn't install vim from bottles but compiled it with specific options.
I'm still getting this daily with 8.0.1400 right now. It's somewhat unpredictable though. I can open and close vim 10x, but it only happens sometimes with same data in clipboard. Not sure the cause 馃槦