Ask Your Question

how to add feature to vim?

asked 2014-03-17 13:18:12 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

My vim doesn't have the clipboard feature and so i can't copy to the system's clipboard. how to i add that feature to vim?

edit retag flag offensive close merge delete



do you use shift+insert to paste to the vim ?

sysek gravatar imagesysek ( 2014-03-17 13:41:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-17 13:48:31 -0500

hmaarrfk gravatar image

updated 2014-03-17 13:51:49 -0500

I think you might want to look into vim-x11, I think that one is compiled with x11 clipboard support.

sudo yum install vim-X11

My .vimrc has this line in it.

set clipboard=unnamedplus " shared system clipboard.

you might also want to try unnamed instead of unnamedplus

I have to say, that it works with certain shells and not others (eg. works well with bash, doesn't work so well with fish).

You might also want to look into paste mode

" <F2>: enter paste mode (while in insert mode) to paste from outside vim safely
noremap <F2> :set invpaste paste?<cr>
set pastetoggle=<F2>
edit flag offensive delete link more


should i first uninstall vim (sudo yum erase vim)? and will it remove the current vimrc (witch have many custom settings)?

bla bla gravatar imagebla bla ( 2014-03-17 13:54:19 -0500 )edit

You should not modify /etc/vimrc - use the personal settings in ~/.vimrc instead. If you modified /etc/vimrc do: yum remove vim-common; yum install vim-common. yum reinstall vim-common won't restore the original `/etc/vimrc due to the fact that %config(noreplace) (see and ) does not apply to yum reinstall.

marcindulak gravatar imagemarcindulak ( 2014-03-20 11:20:44 -0500 )edit

I don't think there is a package called vim, just install vim-x11. I don't know of a case where yum modifies anything in your home directory. Typically, new versions of software try to retain your configurations and not modify your dot files.

hmaarrfk gravatar imagehmaarrfk ( 2014-03-20 12:08:38 -0500 )edit

@hmaarrfk - have you read my comment above?

marcindulak gravatar imagemarcindulak ( 2014-03-20 13:28:07 -0500 )edit

Question Tools



Asked: 2014-03-17 13:18:12 -0500

Seen: 826 times

Last updated: Oct 07 '15