在我的 ~/.vimrc
中,我为没有右滚动条设置了 set guioptions-=r
。不幸的是,我仍然在 vim 中看到正确的滚动条(在终端中运行),尽管我无法滚动它。
这是我的 ~/.vimrc
文件:
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
" Toggle paste with F2 so that pasting from external applications goes well
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
set showmode
" Mapping ctrl-c ctrl-space to intellisense
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
\ "\<lt>C-n>" :
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
imap <C-@> <C-Space>
" Ruby and Rails preferences
set term=xterm-256color"
colorscheme wombat256mod
set guifont=Monaco:h12
let g:NERDTreeWinPos = "right"
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
autocmd User Rails let b:surround_{char2nr('-')} = "<% \r %>" " displays <%%> correctly
:set cpoptions+=$ " puts a $ marker for the end of words/lines in cw/c$commands
" Transparent background
hi Normal ctermfg=252 ctermbg=none
hi NonText ctermfg=250 ctermbg=none
" Display line numbers
set number
我希望有人能告诉我如何删除滚动条。
最佳答案
I have set gui options-=r for no right scroll bar. [...] in vim (run in terminal), although I cannot scroll it.
为什么您期望特定于 GUI 的选项对非 GUI 程序有任何影响?
你看到的滚动条是终端模拟器的,不是 Vim 的。
如果您想摆脱那个滚动条,请在终端模拟器的设置中禁用它。
关于linux - 无法删除 Vim 中的右滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25583577/