1

Actually, I am unable to do so when I am using MacVim Application. But inside iterm using Vim (the same MacVim release), I am able to.

They also both use the same .vimrc . Both versions compiled with -xterm_clipboard and +clipboard

Macos version is 10.13.2 .

The version info of the MacVim application:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 14 2018 05:28:49)
macOS version
Included patches: 1-280
Compiled by travis@Traviss-Mac-1044.local
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +cmdline_compl     +emacs_tags        +iconv             +mksession         -mzscheme          +reltime           +termguicolors     +visualextra
+arabic            +cmdline_hist      +eval              +insert_expand     +modify_fname      +netbeans_intg     +rightleft         +terminal          +viminfo
+autocmd           +cmdline_info      +ex_extra          +job               +mouse             +num64             +ruby/dyn          +terminfo          +vreplace
+autochdir         +comments          +extra_search      +jumplist          +mouseshape        +odbeditor         +scrollbind        +termresponse      +wildignore
-autoservername    +conceal           +farsi             +keymap            +mouse_dec         +packages          +signs             +textobjects       +wildmenu
+balloon_eval      +cryptv            +file_in_path      +lambda            -mouse_gpm         +path_extra        +smartindent       +timers            +windows
+balloon_eval_term +cscope            +find_in_path      +langmap           -mouse_jsbterm     +perl/dyn          +startuptime       +title             +writebackup
+browse            +cursorbind        +float             +libcall           +mouse_netterm     +persistent_undo   +statusline        +toolbar           -X11
++builtin_terms    +cursorshape       +folding           +linebreak         +mouse_sgr         +postscript        -sun_workshop      +transparency      -xfontset
+byte_offset       +dialog_con_gui    -footer            +lispindent        -mouse_sysmouse    +printer           +syntax            +user_commands     +xim
+channel           +diff              +fork()            +listcmds          +mouse_urxvt       +profile           +tag_binary        +vartabs           -xpm
+cindent           +digraphs          +fullscreen        +localmap          +mouse_xterm       +python/dyn        +tag_old_static    +vertsplit         -xsmp
+clientserver      +dnd               -gettext           +lua/dyn           +multi_byte        +python3/dyn       -tag_any_white     +virtualedit       -xterm_clipboard
+clipboard         -ebcdic            -hangul_input      +menu              +multi_lang        +quickfix          -tcl               +visual            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    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 -DMACOS_X_DARWIN  -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. -fstack-protector -L/usr/loca
l/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 -framework Cocoa -framework Carbon       -lm  -lncurses -l
iconv -framework AppKit   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE

I have the following line in .vimrc

 set clipboard+=unnamed,unnamedplus 

set paste doesn't help.

Suggestions will be welcomed.

  • Well, actually the middle mouse button does work for paste. I have no idea how to copy(beside <C-W> N). And I don't always use a mouse. – eyal karni Nov 2 '18 at 22:53
  • When you say you can't use the clipboard do you mean you can't copy paste like normal (ie with Command+C) or can you not access the clipboard with the +register? – ljden Nov 3 '18 at 2:24
  • Both. Normal vim commands don't work when you are in the terminal. And Command+C doesn't work. – eyal karni Nov 3 '18 at 15:24
1

According to the vim terminal documentation, there is a special key binding for pasting in a terminal window. From the Vim terminal window support documentation on the Vim git repo.

CTRL-W " {reg}  paste register {reg}        *CTRL-W_quote*
        Also works with the = register to insert the result of
        evaluating an expression.

Other than using the middle mouse button, this is the only reference to copy/pasting I could see.

NB: I don't have a mac so this is untested, hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.