VIM 편집기에서 클립보드로 복사하는 것이 CentOS 6에서 작동하지 않습니까?

VIM 편집기에서 클립보드로 복사하는 것이 CentOS 6에서 작동하지 않습니까?

vim저는 CentOS 6(Gnome Desktop Environment)을 사용하고 있으며 명령으로 필요하기 때문에 편집기로 .txt 파일을 열고 해당 텍스트를 터미널/명령줄에 붙여 넣어 URL을 복사해 보았습니다 .

단순히 누르기만 하면 "*dd텍스트가 클립보드 메모리에 복사되지 않고 대신 잘못된 드럼 사운드가 재생됩니다. 마우스가 아닌 키보드에만 의존하고 싶은데 괜찮을까요?


편집 1

보시다시피, clipboard이러한 기능을 활성화하려면 어떻게 해야 합니까?xterm_clipboardvim

[dolly@centos Economics]$ vim --version | grep -i clipboard
-clipboard       +iconv           +path_extra      -toolbar
+eval            +mouse_dec       +startuptime     -xterm_clipboard
[dolly@centos Economics]$ 

편집 2

이것이 완전한 출력이다vim 뒤쪽에설치하다vim-X11

[dolly@centos Economics]$ vi --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2016 17:06:34)
Included patches: 1-207, 209-629
Modified by <[email protected]>
Compiled by <[email protected]>
Huge 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            +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: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-E -Wl,-rpath,/usr/lib/perl5/CORE   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl  -lselinux  -ltinfo -lacl -lattr -lgpm   -Wl,-E -Wl,-rpath,/usr/lib/perl5/CORE  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc       
[dolly@centos Economics]$ 

편집 3

[dolly@centos vim-master]$ sudo ./configure --with-features=normal --with-x --enable-gui
[sudo] password for dolly: 
configure: creating cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for library containing strerror... none required
checking for gawk... gawk
checking for strip... strip
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking --enable-fail-if-missing argument... no
checking for clang version... N/A
configure: checking for buggy tools...
- sh is 'GNU bash, version 4.1.2(2)-release (i386-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.' - probably OK.
- sed is    'GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.'.
checking for BeOS... no
checking for QNX... no
checking for Darwin (Mac OS X)... no
checking AvailabilityMacros.h usability... no
checking AvailabilityMacros.h presence... no
checking for AvailabilityMacros.h... no
checking --with-local-dir argument... Defaulting to /usr/local
checking --with-vim-name argument... Defaulting to vim
checking --with-ex-name argument... Defaulting to ex
checking --with-view-name argument... Defaulting to view
checking --with-global-runtime argument... no
checking --with-modified-by argument... no
checking if character set is EBCDIC... no
checking --disable-smack argument... no
checking linux/xattr.h usability... yes
checking linux/xattr.h presence... yes
checking for linux/xattr.h... yes
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
checking --disable-selinux argument... no
checking for is_selinux_enabled in -lselinux... no
checking --with-features argument... normal
checking --with-compiledby argument... no
checking --disable-xsmp argument... no
checking --disable-xsmp-interact argument... no
checking --enable-luainterp argument... no
checking --enable-mzschemeinterp argument... no
checking --enable-perlinterp argument... no
checking --enable-pythoninterp argument... no
checking --enable-python3interp argument... no
checking --enable-tclinterp argument... no
checking --enable-rubyinterp argument... no
checking --enable-cscope argument... no
checking --enable-workshop argument... no
checking --disable-netbeans argument... no
checking --disable-channel argument... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking whether compiling with process communication is possible... yes
checking --enable-terminal argument... defaulting to no
checking --enable-autoservername argument... no
checking --enable-multibyte argument... no
checking --enable-hangulinput argument... no
checking --enable-xim argument... defaulting to auto
checking --enable-fontset argument... no
checking for xmkmf... no
checking for X... no
checking if X11 header files can be found... no
checking --enable-gui argument... no GUI support
checking X11/SM/SMlib.h usability... no
checking X11/SM/SMlib.h presence... no
checking for X11/SM/SMlib.h... no
checking for /proc link to executable... /proc/self/exe
checking for CYGWIN or MSYS environment... no
checking whether toupper is broken... no
checking whether __DATE__ and __TIME__ work... yes
checking whether __attribute__((unused)) is allowed... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking for main in -lelf... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking stdint.h usability... yes
checking stdint.h presence... yes
checking for stdint.h... yes
checking stdlib.h usability... yes
checking stdlib.h presence... yes
checking for stdlib.h... yes
checking string.h usability... yes
checking string.h presence... yes
checking for string.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking termcap.h usability... no
checking termcap.h presence... no
checking for termcap.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sgtty.h usability... yes
checking sgtty.h presence... yes
checking for sgtty.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/types.h usability... yes
checking sys/types.h presence... yes
checking for sys/types.h... yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking inttypes.h usability... yes
checking inttypes.h presence... yes
checking for inttypes.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking unistd.h usability... yes
checking unistd.h presence... yes
checking for unistd.h... yes
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/systeminfo.h usability... no
checking sys/systeminfo.h presence... no
checking for sys/systeminfo.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/stream.h usability... no
checking sys/stream.h presence... no
checking for sys/stream.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking libc.h usability... no
checking libc.h presence... no
checking for libc.h... no
checking sys/statfs.h usability... yes
checking sys/statfs.h presence... yes
checking for sys/statfs.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking util/debug.h usability... no
checking util/debug.h presence... no
checking for util/debug.h... no
checking util/msg18n.h usability... no
checking util/msg18n.h presence... no
checking for util/msg18n.h... no
checking frame.h usability... no
checking frame.h presence... no
checking for frame.h... no
checking sys/acl.h usability... no
checking sys/acl.h presence... no
checking for sys/acl.h... no
checking sys/access.h usability... no
checking sys/access.h presence... no
checking for sys/access.h... no
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for sys/ptem.h... no
checking for sys/sysctl.h... yes
checking for pthread_np.h... no
checking strings.h usability... yes
checking strings.h presence... yes
checking for strings.h... yes
checking if strings.h can be included after string.h... yes
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for uint32_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for ino_t... yes
checking for dev_t... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for rlim_t... yes
checking for stack_t... yes
checking whether stack_t has an ss_base field... no
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.
[dolly@centos vim-master]$ 

"pip install neovim"에서 오류가 발생했습니다.

내용은 다음과 같습니다sudo pip install neovim 2> neovim-error.txt

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lpARIW/greenlet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-b4twTs-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lpARIW/greenlet/

답변1

+xterm_clipboard대신에 버전 정보가 필요합니다 -xterm_clipboard. 이 문제를 해결하려면 설치해야 한다고 생각합니다 vim-gui-common. 그런 다음 레지스터를 가져올 수 있습니다 *. 예를 들어 "*yy"클립보드로 한 줄을 가져올 수 있습니다.

그러나 여기서는 해결해야 할 사례가 있다고 생각합니다 neovim. 목표 중 하나는 릴리스 시 모든 기능을 활성화하는 것입니다. 따라서 이 모든 구성을 수행하고 개별 기능을 설치/컴파일할 필요가 없습니다. 아마도 이 경우에 유용할 것입니다.

답변2

아래와 같이 지원 되는 패키지를 설치 vim-X11하거나 소스에서 vim을 컴파일하십시오.xterm_clipboard이것답변.

그런 다음 삭제를 사용 "+dd하고 이를 레지스터에 복사해야 합니다 x clipboard.

마침내 나는 이렇게 했습니다.

#!/bin/bash
sudo yum install yum-utils
sudo yum-builddep vim-X11
sudo yum install libX11 libX11-devel libXtst libXtst-devel \
                  perl-ExtUtils-Embed xclip xsel
cd ~/packages
git clone https://github.com/vim/vim.git --depth 1
cd vim
make distclean
./configure --with-features=huge \
            --with-x \
            --enable-cscope \
            --enable-gui \
            --enable-luainterp=yes \
            --enable-multibyte \
            --enable-perlinterp=yes \
            --enable-pythoninterp=yes \
            --enable-python3interp=yes \
            --enable-rubyinterp=yes \
            --prefix=/usr
sudo make install

관련 정보