使用iTerm和Vim禁用奇怪的轨迹板滚动行为

使用iTerm和Vim禁用奇怪的轨迹板滚动行为,vim,Vim,当我不小心击中Vim中的轨迹板时,它会向上滚动到一个“新”Vim窗格。实际上我不确定它滚动到哪个实体,但下面是它的样子: 有没有关于如何防止这种情况发生的想法 这是我的.vimrc文件: set nocompatible " required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/

当我不小心击中Vim中的轨迹板时,它会向上滚动到一个“新”Vim窗格。实际上我不确定它滚动到哪个实体,但下面是它的样子:

有没有关于如何防止这种情况发生的想法

这是我的
.vimrc
文件:

set nocompatible              " required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-airline/vim-airline'
Plugin 'auto-pairs-gentle'
Plugin 'tpope/vim-sensible'
Plugin 'vim-syntastic/syntastic'
Plugin 'jiangmiao/auto-pairs'
Plugin 'Xuyuanp/nerdtree-git-plugin'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required


let g:AutoPairsUseInsertedCount = 1
set backspace=indent,eol,start " backspace over everything in insert mode

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif


let g:syntastic_python_checkers=['flake8']
let g:syntastic_python_flake8_args='--ignore=D100,D101,D103,D104,D105,I002,E501'


autocmd vimenter * if !argc() | NERDTree | endif


if has('gui_running')
    set background=dark
    colorscheme solarized
else
    colorscheme zenburn
endif

set nu

let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
let NERDTreeAutoDeleteBuffer = 1
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
map <silent> <C-n> :NERDTreeToggle<CR>

set splitbelow
set splitright

nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

" Enable folding
set foldmethod=indent
set foldlevel=120

" Enable folding with the spacebar
nnoremap <space> za

let g:SimpylFold_docstring_preview=1

au BufNewFile,BufRead *.py
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set textwidth=120 |
    \ set expandtab |
    \ set autoindent |
    \ set fileformat=unix


set encoding=utf-8

let python_highlight_all=1
syntax on

fun! TrimWhitespace()
    let l:save = winsaveview()
    %s/\s\+$//e
    call winrestview(l:save)
endfun


noremap <ScrollWheelUp>      <nop>
noremap <S-ScrollWheelUp>    <nop>
noremap <C-ScrollWheelUp>    <nop>
noremap <ScrollWheelDown>    <nop>
noremap <S-ScrollWheelDown>  <nop>
noremap <C-ScrollWheelDown>  <nop>
noremap <ScrollWheelLeft>    <nop>
noremap <S-ScrollWheelLeft>  <nop>
noremap <C-ScrollWheelLeft>  <nop>
noremap <ScrollWheelRight>   <nop>
noremap <S-ScrollWheelRight> <nop>
noremap <C-ScrollWheelRight> <nop>
set nocompatible”为必填项
“文件类型关闭”是必需的
“将运行时路径设置为包括Vundle和initialize
设置rtp+=~/.vim/bundle/Vundle.vim
调用vundle#begin()
或者,传递Vundle安装插件的路径
“调用vundle#begin(“~/some/path/here”)
“让Vundle管理Vundle,这是必需的
插件'gmarik/Vundle.vim'
“在此处添加所有插件(请注意,Vundle的旧版本使用捆绑包而不是插件)
插件“tmhedberg/SimpylFold”
插件“vim脚本/indentpython.vim”
插件“nvie/vim-8”
插件“jnurmine/Zenburn”
插件“Interchange/vim颜色日光浴”
插件'scroolose/nerdtree'
插件“jistr/vim nerdtree选项卡”
插件'kien/ctrlp.vim'
插件“tpope/vim逃犯”
插件“vim航空公司/vim航空公司”
插件“自动配对”
插件“tpope/vim-sensible”
插件“vim syntastic/syntastic”
插件“姜苗/自动配对”
插件“Xuyunp/nerdtree git插件”
“所有插件都必须添加到下一行之前
需要调用vundle#end()
“必需”上的文件类型插件缩进
设g:AutoPairsUseInsertedCount=1
设置退格=缩进、下线、开始“在插入模式下对所有内容退格
autocmd StdinReadPre*让s:std_in=1
如果argc()==1&&isdirectory(argv()[0])&&!存在(“s:std_in”)| exe'NERDTree'argv()[0]| wincmd p|ene | endif
设g:syntastic_python_checkers=['flake8']
设g:syntastic_python_flake 8_args='--ignore=D100、D101、D103、D104、D105、I002、E501'
autocmd vimenter*if!argc()| NERDTree | endif
如果有('gui_running')
设置背景=暗
日光浴
其他的
色系zenburn
恩迪夫
显示行号
让NERDTreeIgnore=['\.pyc$','\~$']忽略NERDTree中的文件
设NERDTreeAutoDeleteBuffer=1
设nerdtreemminimaui=1
设NERDTreeDirArrows=1
地图:nerdtreethoggle
在下面设置拆分
设置拆分权限
nnoremap
nnoremap
nnoremap
nnoremap
“启用折叠
设置折叠方法=缩进
设置foldlevel=120
“使用空格键启用折叠
诺雷扎地图
设g:SimpylFold\u docstring\u preview=1
au BufNewFile,BufRead*.py
\设置tabstop=4|
\设置softtabstop=4|
\设置shiftwidth=4|
\设置textwidth=120|
\设置扩展选项卡|
\设置自动缩进|
\设置fileformat=unix
设置编码=utf-8
让python_突出显示_all=1
语法高亮
有趣!TrimWhitespace()
让l:save=winsaveview()
%s/\s\+$//e
调用winrestview(l:保存)
结束
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克
诺雷马克

set mouse=a
应该会有帮助。@romainl这很有效!添加作为答案,我将接受
set mouse=a
应该有帮助。@romainl这很有效!添加作为答案,我将接受