<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vim on Net Boy</title>
    <link>https://lian.st/tags/vim/</link>
    <description>Recent content in Vim on Net Boy</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Mon, 09 Dec 2024 17:39:44 +0800</lastBuildDate><atom:link href="https://lian.st/tags/vim/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Debian vim滑鼠右鍵無法使用解決</title>
      <link>https://lian.st/posts/1342b289/</link>
      <pubDate>Mon, 09 Dec 2024 17:39:44 +0800</pubDate>
      
      <guid>https://lian.st/posts/1342b289/</guid>
      
      <description>&lt;p&gt;Debian中通過終端使用vim，滑鼠無法使用右鍵的復制粘貼等功能，這是由於vim的一向默認配置導致，按照下面方法修改即可。&lt;/p&gt;
&lt;h2 id=&#34;解決方法&#34;&gt;解決方法&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; vi /usr/share/vim/vim*/defaults.vim
....
 80 if has(&amp;#39;mouse&amp;#39;)
 81   if &amp;amp;term =~ &amp;#39;xterm&amp;#39;
 82     set mouse-=a
 83   else
 84     set mouse=nvi
 85   endif
 86 endif
...
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;說明&#34;&gt;說明&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mouse 選型默認爲 a，相關說明如下：

The mouse can be enabled for different modes:
n Normal mode
v Visual mode
i Insert mode
c Command-line mode
h all previous modes when editing a help file
a all previous modes
r for |hit-enter| and |more-prompt| prompt
Normally you would enable the mouse in all four modes with:
:set mouse=a

When the mouse is not enabled, the GUI will still use the mouse for
modeless selection. This doesn&amp;#39;t move the text cursor.
&lt;/code&gt;&lt;/pre&gt;</description>
      
    </item>
    
  </channel>
</rss>
