Tôi hiện đang mở phiên vim
trong Putty và tôi đã chọn mọi thứ trong tệp qua chế độ trực quan. Thông thường để sao chép nó vào clipboard, tôi sẽ sử dụng hoặc "+y
hoặc "*y
, nhưng cả hai lệnh này đều không hoạt động.Sao chép từ chế độ trực quan của Putty/Vim sang cửa sổ clipboard
Dưới đây là vimrc của tôi:
call pathogen#infect()
set noswapfile
set mouse="
set ts=4
set wildmenu
set wildmode=list:longest,full
colorscheme evening
set expandtab
set smarttab
" Stuff from github:
set ts=4
set wildmenu
set wildmode=list:longest,full
set number
" This shows what you are typing as a command. I love this!
set showcmd
" Who doesn't like autoindent?
set autoindent
" Spaces are better than a tab character
set expandtab
set smarttab
" Who wants an 8 character tab? Not me!
set shiftwidth=3
set softtabstop=3
" Ignoring case is a fun trick
set ignorecase
" When I close a tab, remove the buffer
set hidden
" Set word wrapping
set linebreak
" Use filetype specific indentation
filetype on
filetype plugin on
filetype indent on
" Disable auto commenting
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
Có một công việc xung quanh cho điều này, bởi vì tôi thường sử dụng putty hơn là một ssh của máy linux/OS X –
Trong cấu hình PuTTY Connection -> SSH -> X11, bạn có thể kích hoạt tính năng chuyển tiếp X11. gắn cờ trên kết nối. Tôi có thể xác nhận giải pháp này hoạt động, tôi cũng đã xem bài viết này: http://www.quora.com/How-can-you-copy-all-contents-of-a-text-file-opened-in-vim- thông qua-Putty-on-a-Windows-máy tính để bàn-to-Windows-clipboard Tôi đang chạy PuTTY trên Windows 7, kết nối với một hộp Vagrant với cổng XMing forwared và có thể sao chép từ vim vào clipboard thông qua ' "* y' –