<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=8221&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / HOWTO : Disable mouse cursor movement inside vim document]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=8221</link>
		<description><![CDATA[The most recent posts in HOWTO : Disable mouse cursor movement inside vim document.]]></description>
		<lastBuildDate>Thu, 01 Oct 2026 16:08:22 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[HOWTO : Disable mouse cursor movement inside vim document]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65799#p65799</link>
			<description><![CDATA[<p>When editing in &quot;vi&quot; it is common practice for me to hit &quot;i&quot;nsert, highlight a block of text, and click the middle-mouse button to paste the selected text at the insert position.&#160; That worked well during my years in the RedHat ecosystem.&#160; Transitioning to Devuan, I discovered the default vim installation intercepted mouse clicks to implement cursor movement inside the document.&#160; Clicking to highlight a block of text moved the cursor from the original insert point and made a mess of the document on paste.</p><p>My quick-n-dirty solution was to delete the &quot;defaults.vim&quot; from &quot;/usr/share/vim/vimNN/&quot; to reset to a barebones vim configuration that did not set a mouse mode.&#160; But that was not a robust solutions that survived updates, so I made it a goal to dig deeper and my solution evolved to create a &quot;/etc/vim/vimrc.local&quot; with the following contents :</p><div class="codebox"><pre class="vscroll"><code>&quot; Tell Devuan to stop overriding this file with defaults.vim
let g:skip_defaults_vim = 1

&quot; Eliminate source of RCE/malicious text file security/resource exploits
set nomodeline

&quot; Prevent startup scripts from executing shell code or writing files
set secure

&quot; Prevent leaking sensitive data into local directories via swap files
set noswapfile

&quot; Turn syntax highlighting back on safely
if has(&quot;syntax&quot;)
  syntax on
endif

&quot; Prevent vim from intercepting mouse events handled by X11/Wayland
if has(&quot;mouse&quot;)
  set mouse=
endif

&quot; Global 2-space tab configuration
&quot; Use :retab in vim to replace tabs with spaces in existing documents
set tabstop=2
set shiftwidth=2
set expandtab

&quot; Core essential editing behaviors stripped by skipping defaults
&quot; hlsearch:   Highlight all matches when searching text
&quot; incsearch:  Show search matches instantly as you type
&quot; backspace:  Make the Backspace key work normally over line breaks
&quot; scrolloff:  Show context above/below cursor when scrolling
&quot; nowrap:     Prevent line wrap with an infinitely long right edge
set hlsearch
set incsearch
set backspace=indent,eol,start
set scrolloff=3
set nowrap</code></pre></div><p>If anyone has had similar experience and tweaked &quot;/etc/vim/vimrc.local&quot; further for safety, security, or efficiency please chime in.</p><p>This guide was very helpful to me discerning the settings : <a href="https://danmc.net/posts/2019/vim-config-1/" rel="nofollow">https://danmc.net/posts/2019/vim-config-1/</a></p><p>Cheers,<br />--K</p>]]></description>
			<author><![CDATA[dummy@example.com (kaiyel)]]></author>
			<pubDate>Thu, 01 Oct 2026 16:08:22 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65799#p65799</guid>
		</item>
	</channel>
</rss>
