无法在Vim中删除右滚动条

时间:2014-08-30 14:43:55

标签: linux vim mint

在我的~/.vimrcset 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

我希望有人可以告诉我如何删除滚动条。

1 个答案:

答案 0 :(得分:1)

  

我已将 gui 选项 - = r设为无右滚动条。 [...]在vim中(在终端中运行),虽然我无法滚动它。

为什么您希望特定于GUI的选项在非GUI程序中起作用?

您看到的滚动条是您的终端模拟器,而不是Vim。

如果您想摆脱该滚动条,请在终端模拟器的设置中将其禁用。