Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions about the use of a mouse with Vi or Vim.

0
votes
1answer
20 views

How to disable default mouse wheel behavior in iTerm?

I have: nnoremap <ScrollWheelUp> k nnoremap <S-ScrollWheelUp> k nnoremap <C-ScrollWheelUp> k nnoremap <ScrollWheelDown> j nnoremap <S-ScrollWheelDown> j nnoremap <C-...
0
votes
1answer
29 views

Split resizing with mouse not working after upgrade from ubuntu 16.04 to 18

I use to be able to resize my vim splits using the mouse in the terminal by clicking on the borders and dragging. Now I can't. How can I make it work again? edit: still works in gvim but doesn't work ...
0
votes
1answer
30 views

Scroll wheel inserts seemingly-random characters in cygwin vim, depending on where on the screen the mouse cursor is

I have the following options set to non-default values, as reported by :redir @+ | :set | @redir end: --- Options --- autochdir cscopetag foldcolumn=7 hlsearch lazyredraw relativenumber sidescroll=1 ...
2
votes
2answers
65 views

hide the WinBar (TermDebug)

Vim 8.1 add a new :Termdebug command with a really good gdb integration. If the mouse option is set, there is also a visual bar appearing on vim. Here is an extract of the man: If 'mouse' is set the ...
2
votes
1answer
61 views

How to use “FocusGained” to stop my cursor from moving

I tend to use GVim a lot. Very frequently, I'll click on some other window and then when I click on vim to regain focus, my cursor will end up in some random location depending on where I clicked. I ...
0
votes
1answer
36 views

Is it possible to do not expand the Visual-mode selection with ScrollWheelUp/Down?

When I select some text in Visual mode (either with keyboard or mouse), and I scroll the mouse wheel up/down, the visual mode expands the selection in up/down direction according to the mouse ...
0
votes
1answer
60 views

How to setup the default browser to follow hyperlinks [closed]

On a text file with a hyperlink (http://url/) if I hover the mouse over the hyperlink and click on it, it is opened on chrome. How can I change the browser that vim decides to use when following ...
0
votes
2answers
3k views

Fully disable mouse in console vim

I saw completely disable mouse in console vim on Stack Overflow. It sounded like exactly what I wanted, but there the problem was related to Cygwin, so the title was a misnomer. I want to know how ...
2
votes
2answers
994 views

How to disable moving the cursor with the mouse

I've been using Vim for decades (and Vi before it since around 1984.) I use it now on Linux. Somewhere along the line one behavior crept in that I'd like to disable: when I click in a window to move ...
3
votes
1answer
137 views

Console vim(x): Can I map the scroll wheel to undo--redo?

It's sort-of a follow to a recent XKCD. I want to know whether it's possible to map the scroll wheel to undo and redo, possibly n undos/redos per scroll? I'm using mate-terminal in MATE 1.6.x, bash, ...
2
votes
1answer
139 views

How can I use mouse=a for local and remote work?

I do use the same vimrc on my local machine and on a remote machine to which I connect through SSH. I keep the vimrc synced between the machines for commodity. My issue starts when I set mouse=a, I ...
4
votes
1answer
229 views

Can I use the mouse scroll wheel to browse the auto-completion popup menu?

Is is possible to use <ScrollWheelUp> and <ScrollWheelDown> while the auto-complete popup is open? I tried using the map inoremap <expr> <ScrollWheelUp> pumvisible() ? "<Up&...
7
votes
1answer
519 views

Visual scrolling/visual <C-e> and <C-y> across wrapped lines?

This has been asked on stackoverflow before, but it seems it still has no solution. Perhaps that has changed with Vim 8.0. I'd like to be able to scroll (i.e. scroll-wheel, or <C-y>/<C-e> ...
0
votes
1answer
268 views

Cancel mouse highlight on mac

Whenever I use vim, sometimes I make a single-touch touchpad on vim screen and it makes a highlight like the picture below. The problem is this I cannot cancel this highlight. right click doesn't ...
5
votes
1answer
300 views

Can I scroll in vim with my touch screen?

I frequently use gvim on a windows 7 computer with a touch screen. If I flick up or down with the touch screen, it creates a selection (in S mode, not V mode). I'm not really a fan of this default ...
1
vote
2answers
2k views

disable previously enabled mouse with Vim script

I've added this script to my vimrc file command! EnableMouse :call EnableMouseFunction() function! EnableMouseFunction() let command = ":set mouse=a" exe command endfunction So, ... what is ...
2
votes
2answers
620 views

Mouse click navigation in vim tab

Now I navigate from one tab to another tab in Vim using the gt command, but it's little frustrating for me, because so far I've worked with editors that support mouse navigation. Is there a way that ...
2
votes
2answers
443 views

How to keep Vim from exiting Visual Mode due to mouse clicks while mouse=a?

Currently when I click somewhere in the terminal with mouse=a enabled, Vim exits visual mode. How can I force Vim to remain in Visual mode, and thereby use mouse clicks (not drags) to create a ...
0
votes
0answers
68 views

accidental turn of mouse wheel when pasting text

A problem that bothers much my editing work with vim happens when pasting text and the mouse wheel rotates slightly by accident with the result that text is inserted elsewhere in the file under ...
4
votes
1answer
327 views

How can I disable all mouse functions in MacVim?

Is there a way that I can use the 'mouse' option to disable all mouse functions in MacVim?
1
vote
1answer
130 views

How to let the cursor push the screen instead of the the screen drag the cursor when scrolling with the mouse?

How to let the cursor push the screen instead of the the screen drag the cursor when scrolling with the mouse? I switched to iterm 2 on osx, but in the regular osx terminal when i scroll the ...
5
votes
1answer
1k views

What's the difference between the “clipboard” and “xterm_clipboard” features?

What is the difference between the clipboard and xterm_clipboard features? When do I need to enable one or the other at compilation time? As an aside, how do these features relate to the mouse ...
2
votes
1answer
567 views

Can I use the mouse for folding/unfolding in Gvim?

The title says most of it. For the curious, folding is something I haven't yet included in my workflow. I use gvim most of the time and I often have my hand on the mouse, scrolling through code. Is ...
2
votes
1answer
76 views

Selecting block with a mouse when line numbering is enabled [duplicate]

How can I select a block with a mouse when line numbering is enabled. The selection includes the line numbering. Is there a way to exclude the line numbering from mouse selection ? Clarification: The ...
7
votes
1answer
211 views

Can visual select mode be integrated with the Unix selection clipboard?

Is it possible to configure vim (obviously with :set mouse=a) and/or gvim such that the visual selection modes automatically integrate with X's selection buffer? I am aware of how to setup the copy ...
4
votes
2answers
3k views

How to select and copy lines to clipboard which are selected by mouse without linenumbers and gutter?

In my default Vim settings I've enabled a gutter and line numbers. Sometimes I copy some lines to clipboard in order to paste somewhere else. Currently I need to disable line numbers and the gutter. ...
10
votes
3answers
947 views

How can I use my trackpad for horizontal scrolling?

I just noticed that my trackpad scroll works in Vim, inertia and all. I'd like to change this to work horizontally - so I can scroll up and down to make the cursor move left-and-right instead of ...
18
votes
2answers
4k views

Scroll the screen, not the cursor, when using scrollwheel

I'm using Vim in a terminal, so scrolling with the scroll wheel uses the \e[A and \e[B syntax (where \e symbolizes \x1b, or escape). However, Vim interprets this by moving the cursor up or down a ...