Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Just drop the mouse scrollwheel binds

Signed-off-by: Chris Larson <chris_larson@mentor.com>
  • Loading branch information...
commit 9321f1b302c96ca56fc1792c0e8f0b3518739554 1 parent b2ce601
@kergoth authored
Showing with 0 additions and 56 deletions.
  1. +0 −37 plugin/scrollamount.vim
  2. +0 −19 vimrc
View
37 plugin/scrollamount.vim
@@ -1,37 +0,0 @@
-" Title: ScrollAmount
-" Description: Adjust mouse wheel scroll amount based on window height.
-" Maintainer: Chris Larson <clarson@kergoth.com>
-" Version: 2
-
-if exists("g:loaded_scrollamount") || &cp || !has('autocmd')
- finish
-endif
-let g:loaded_scrollamount = 1
-
-function! <SID>Max(a, b)
- if a:a >= a:b
- return a:a
- else
- return a:b
- endif
-endfunction
-
-function! <SID>MapMouseScroll()
- let mousejump = <SID>Max(winheight(0)/8, 1)
- exe 'map <MouseDown> ' . mousejump . ''
- exe 'map <MouseUp> ' . mousejump . ''
-endfunction
-
-if &ttymouse != '' ||
- \ (has('gui_running') && has('unix'))
- " scrollwheel = intelligent # of lines to scroll based on window height
- augroup KergothScrollWheel
- au!
- au WinEnter,VimEnter * call <SID>MapMouseScroll()
-
- try
- au VimResized * call <SID>MapMouseScroll()
- catch
- endtry
- augroup END
-endif
View
19 vimrc
@@ -233,25 +233,6 @@ nnoremap <silent> <Leader>yr :YRGetElem<CR>
vnoremap <LeftRelease> '+y<LeftRelease>gv
vnoremap <RightRelease> '+y<RightRelease>gv
-" Mouse scroll wheel mappings only work in X11 and terminals
-if &ttymouse != '' ||
- \ (has('gui_running') && has('unix'))
- map <MouseDown> 3
- map <MouseUp> 3
-
- " meta (alt)+scrollwheel = scroll one line at a time
- map <M-MouseDown> 
- map <M-MouseUp> 
-
- " ctrl+scrollwheel = scroll half a page
- map <C-MouseDown> 
- map <C-MouseUp> 
-
- " shift+scrollwheel = unmapped
- " unmap <S-MouseDown>
- " unmap <S-MouseUp>
-endif
-
" Execute an appropriate interpreter for the current file
" If there is no #! line at the top of the file, it will
" fall back to g:interp_<filetype>, and further to <filetype>.
Please sign in to comment.
Something went wrong with that request. Please try again.