编辑:我尝试通过拖动*
或复制到剪贴板+
,但都不起作用。如果我输入,:reg
我看不到任何已分配的内容。
我已经gtk-vim
安装并运行vim --version | grep -e +clipboard
返回以下内容:
+clipboard +iconv +path_extra +toolbar
sidneyc@nb8395:~$ vim --version | grep -e '+mouse.*' -e +clipboard
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+balloon_eval +float +mouse_urxvt -tag_any_white
+browse +folding +mouse_xterm +tcl
+clipboard +iconv +path_extra +toolbar
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape -sniff +xsmp_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
您可以在下面看到我的.vimrc
文件。
" Encoding
set encoding=utf-8
set fileencoding=utf-8
" Enabling colorful status bar
set t_Co=256
set laststatus=2
" Syntax Highlighting
syntax enable
filetype plugin indent on
" Auto reload file on external change
set autoread
" Indentation
set backspace=indent,eol,start
set complete-=i
set smarttab
set smartindent
set autoindent
set shiftwidth=4
set tabstop=4
set noexpandtab
" Some visual options
set scrolloff=1
set sidescrolloff=5
set display+=lastline
set backspace=indent,eol,start
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
set title
set background=dark
" Split defaults
set splitbelow
set splitright
" Searching options
set smartcase
" Show line numbers
set number
" Enable mouse
set mouse=a
" Load plugins
call plug#begin('~/.vim/plugged')
Plug 'vim-syntastic/syntastic'
Plug 'flazz/vim-colorschemes'
Plug 'wincent/ferret'
Plug 'kien/ctrlp.vim'
Plug 'itchyny/lightline.vim'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'townk/vim-autoclose'
Plug 'terryma/vim-multiple-cursors'
Plug 'airblade/vim-gitgutter'
Plug 'tfnico/vim-gradle'
Plug 'ekalinin/dockerfile.vim'
Plug 'artur-shaik/vim-javacomplete2'
Plug 'apalmer1377/factorus'
Plug 'easymotion/vim-easymotion'
call plug#end()
" Plugins configuration
map <C-t> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nnoremap <C-r> :set norelativenumber!<CR>
nmap <CR> o<Esc>
let g:lightline = {
\ 'colorscheme': 'Dracula',
\ }
autocmd FileType java setlocal omnifunc=javacomplete#Complete
nnoremap <C-f> :call ToggleFoldingMethod()<CR>
function! ToggleFoldingMethod()
if &fdm == "indent"
set fdm=syntax
else
set fdm=indent
endif
endfunction
可能出了什么问题?