Closed fdelacruz closed 8 years ago
So hitting dd
will save the current line to the unnamed register? I just ran a test with vanilla vim + easyclip and this worked ok on windows (did not save to unnamed register) so I wonder if this is a mac thing.
Yes. Can any other Mac users please attest to this? Make sure I'm not going crazy.
How did you go about testing it in a vanilla vim. My guess is start vim without loading plugins and then load easyclip. Can you please briefly go over that?? Thank you
I should maybe add that I'm using the following settings:
let g:EasyClipUseSubstituteDefaults = 1
let g:EasyClipUseCutDefaults = 0
nmap x <Plug>MoveMotionPlug
xmap x <Plug>MoveMotionXPlug
nmap xx <Plug>MoveMotionLinePlug
let g:EasyClipUsePasteToggleDefaults = 0
nmap <c-f> <plug>EasyClipSwapPasteForward
nmap <c-d> <plug>EasyClipSwapPasteBackwards
Oops!!
For testing these kinds of things I use a stripped down vimrc that just contains the following. Then I run it by executing gvim.exe -u ~/.vimrc2
. I append a 2 to vimrc and also the vim directory to allow me to avoid changing my normal config
" Note: Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
let &rtp = substitute(&rtp, 'Steve/vimfiles\>', 'Steve/vimfiles2', 'g')
let &rtp = substitute(&rtp, 'Steve/.vim\>', 'Steve/.vim2', 'g')
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim2/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim2/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'svermeulen/vim-easyclip.git'
NeoBundle 'tpope/vim-repeat'
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"""""""""""""""""""""""
" Settings
"""""""""""""""""""""""
set clipboard=unnamed
By the way, that vimrc is based on the neobundle page (note that I added some custom paths that won't apply to you)
Unfortunately I don't have a mac so can't try and reproduce this. Can you try it with a similarly stripped down config on your mac?
I'm on it..
Did something similar. Used the striped down vimrc found in the Vundle repo.
# ~/.vimrc2
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'svermeulen/vim-easyclip.git'
Plugin 'tpope/vim-repeat'
call vundle#end()
filetype plugin indent on
clipboard=unnamed
The unnamed register still gets populated on deletes.
I'll see if I can figure out a way to reproduce this on mac. I can't really fix it otherwise
Thanks for looking into this. I'm surprised no other Mac user has noticed this. I hope it's not just me.
I'm starting to think this is a very serious vim bug.
Even manually remapping d to "_d this issue persists :nnoremap d "_d
Oh interesting. The black hole register doesn't work at all? What if you just type "_d instead of using a mapping?
Yes, without using a mapping the black hole register seems to work. scratches head
I found the problem which only happens on js files. The JSHint fork of jslint.vim I was using seems to hijack dw and dd: It's an open issue too. The rest of the commands work as intended after all.
Ah yes. That makes more sense than a vim bug or easyclip completely not working on mac :)
The following
d{motion}, dd, D, c{motion}, cc, C, s, and S
All populate the unnamed ("") register. I have tested it with::command! RegClear :let @a='' | let @-='' | let @0='' | let @1='' | let @"=''
Which then I can use to clear the "a, "-, "0, "1 and the "" registers by issuing:RegClear
. Checking the content of the registers:reg
after each of the aforementioned vim commands. I'm on OS X (SL) vim clipboard=unnamed