index.html 10.5 KB
Newer Older
1
<title>Using Mouse with VIM in the terminal - VARSTACK</title>
2 3 4 5 6 7 8
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
9 10 11 12
}(document, 'script', 'facebook-jssdk'));
var host = "varstack.com";
var hostwww = "www.varstack.com";
if (((host == window.location.host) || (hostwww == window.location.host))
13
        && (window.location.protocol != 'https:'
Pallav Agarwal's avatar
Pallav Agarwal committed
14
            || window.location.toString().match(/http.?:\/\/var/))){
15
  window.location = window.location.toString().replace(/^http:/, "https:").replace(/https:\/\/varstack/, "https://www.varstack");
16 17
}
</script>
Pallav Agarwal's avatar
Pallav Agarwal committed
18
<meta name=viewport content="width=device-width, initial-scale=1">
19 20
<meta charset="utf-8"/>

Pallav Agarwal's avatar
Pallav Agarwal committed
21
<noscript>
Pallav Agarwal's avatar
Pallav Agarwal committed
22
    <link href="/css/bootstrap.min.css" rel="stylesheet">
Pallav Agarwal's avatar
Pallav Agarwal committed
23 24 25
    <link href="/css/highlighting.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    
26
    
Pallav Agarwal's avatar
Pallav Agarwal committed
27
</noscript>
28

Pallav Agarwal's avatar
Pallav Agarwal committed
29
<script id="loadcss">function loadCSS(e,n,o,t){"use strict";var d=window.document.createElement("link"),i=n||window.document.getElementsByTagName("script")[0],r=window.document.styleSheets;return d.rel="stylesheet",d.href=e,d.media="only x",t&&(d.onload=t),i.parentNode.insertBefore(d,i),d.onloadcssdefined=function(e){for(var n,o=0;o<r.length;o++)r[o].href&&r[o].href===d.href&&(n=!0);n?e():setTimeout(function(){d.onloadcssdefined(e)})},d.onloadcssdefined(function(){d.media=o||"all"}),d}
Pallav Agarwal's avatar
Pallav Agarwal committed
30
loadCSS( "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css", document.getElementById("loadcss"));
Pallav Agarwal's avatar
Pallav Agarwal committed
31 32 33
loadCSS( "/css/highlighting.css", document.getElementById("loadcss"));
loadCSS( "/css/style.css", document.getElementById("loadcss"));
    
34
    
Pallav Agarwal's avatar
Pallav Agarwal committed
35
</script>
36 37 38

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
Pallav Agarwal's avatar
Pallav Agarwal committed
39
    <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
40 41 42 43 44
    <![endif]-->

    
    <div class="container">
        <div class="row" id="menu">
45 46 47 48
            <div class="col-sm-2 col-xs-2 menu" id="site_title">
                <a href="/" style="color:black;">
                    <img src="/img/logo.png" style="max-height:90%;">
                </a>
Pallav Agarwal's avatar
Pallav Agarwal committed
49
            </div>
50
            <div class="col-sm-6 col-xs-10 menu">
Pallav Agarwal's avatar
Pallav Agarwal committed
51 52 53
                <div class="row" id="top_menu">
                    <ul class="nav nav-pills">
                        <li class="active" id="blog"><a class="color_change" href="/">Blog</a></li>
54 55 56
                        <li class="" id="tips"><a class="color_change" href="/tips/">Tips</a></li>
                        <li class="" id="algo"><a class="color_change" href="/algo/">Behind The Scenes</a></li>
                        <li class="" id="about"><a class="color_change" href="/about_me/">About Me</a></li>
Pallav Agarwal's avatar
Pallav Agarwal committed
57
                    </ul>
58 59
                </div>
            </div>
60 61 62 63 64
            <div class="col-sm-4 col-xs-12 menu">
                <form action="/search/" id='search-form'>
                    <input id="search-box" type="text" name="query" placeholder="Search..">
                </form>
            </div>
65 66 67
        </div>
        
        <div class="row" id="content">
Pallav Agarwal's avatar
Pallav Agarwal committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
            <div class="col-md-7 col-md-push-3">
                <div class="row" id="data">
                    <div class="col-md-12">
                        <br />
                        <h3>Using Mouse with VIM in the terminal</h3>
                        <hr />
                        <div class="row text-justify" id="content-holder">
                            <div class="col-md-12">
                                <p>Just when you thought vim couldn't surprise you
anymore, vim strikes again.
As it turns out, vim supports mouse integration even
in the terminal. Not only that, the support is mind
blowingly simple and amazing. You can move your cursor,
select text and even resize your panes in a split screen.</p>

<p>Most websites just say to use
<code>set mouse=a</code> in your <code>.vimrc</code> to add mouse support to
your vim. However, this enables mouse in all modes and I
found that it can get very irritating if mouse gets moved
during typing in insert mode. Luckily vim also supports
selective usage of the mouse.</p>

<pre><code>a = all
n = normal mode
v = visual mode
i = insert mode
</code></pre>

<p>There are other options too (check using <code>help mouse</code>).
I found that using:</p>

<p><code>set mouse=nv</code></p>

<p>(for normal and visual, but not insert mode) works best for me.</p>

<p><br /></p>

                            </div>
                        </div>
                    </div>
                </div>
                <hr /><br />
            </div>
            <div class="col-md-3 col-md-pull-7" id="recent">
112 113 114
                <h4>RECENT POSTS</h4>
                <ul class="nav nav-pills nav-stacked">
                    
115 116 117 118
                    <li>
                        <a href="/2017/05/07/How-I-got-here/" class="color_change">An intern's views - How I...</a>
                    </li>
                    
119 120 121 122
                    <li>
                        <a href="/2016/09/26/YourHonour-k8s-programming-judge/" class="color_change">YourHonour: A k8s based distributed programming...</a>
                    </li>
                    
123
                    <li>
124
                        <a href="/2016/06/09/Bugzilla-Landfills/" class="color_change">Learning from mistakes: Bugzilla Landfills</a>
125 126
                    </li>
                    
127
                    <li>
128
                        <a href="/2016/05/13/SAT-Solver/" class="color_change">Determining legal USE Flag combinations using...</a>
129 130
                    </li>
                    
131
                    <li>
132
                        <a href="/2016/05/06/SSH-port-forwarding-and-some-cool-uses/" class="color_change">SSH port forwarding and some cool...</a>
133 134
                    </li>
                    
135 136 137 138
                </ul>
                <h4>RECENT TIPS</h4>
                <ul class="nav nav-pills nav-stacked">
                    
139 140 141 142
                    <li>
                        <a href="/2016/05/06/Ultimate-control-over-mobile-browser/" class="color_change">Ultimate control over Mobile Browser with...</a>
                    </li>
                    
143 144 145 146
                    <li>
                        <a href="/2016/04/27/SSH-keys/" class="color_change">Easy sharing of SSH keys</a>
                    </li>
                    
147 148 149 150
                    <li>
                        <a href="/2015/08/01/SSH-from-Windows/" class="color_change">Using SSH from Windows 10 without...</a>
                    </li>
                    
Pallav Agarwal's avatar
Pallav Agarwal committed
151 152 153 154
                    <li>
                        <a href="/2015/07/27/Boost-Python-Performance/" class="color_change">Cython: Boost Python Code Performance</a>
                    </li>
                    
155
                    <li>
156 157 158 159 160 161 162 163 164
                        <a href="/2015/07/01/Vim-Mappings/" class="color_change">Quick intro to custom Vim Mappings...</a>
                    </li>
                    
                </ul>
                <h4>TAGGED POSTS</h4>
                <ul class="nav nav-pills nav-stacked">
                    
                    <li>
                        <a href="/2016/05/13/Reference-Sheets-and-Useful-Links/" class="color_change">Reference Sheets and Useful Links</a>
165 166
                    </li>
                    
167
                </ul>
Pallav Agarwal's avatar
Pallav Agarwal committed
168 169
                <br />
                <br />
170
            </div>
Pallav Agarwal's avatar
Pallav Agarwal committed
171 172 173
            <div class="col-md-2">
            </div>
            <div class="row">
174
                <div class="col-md-7 col-md-offset-3 col-xs-10 col-xs-offset-1">
175 176
                    <div class="row">
                            <div class="col-xs-4">
Pallav Agarwal's avatar
Pallav Agarwal committed
177
                                <div class="fb-like" data-href="//www.varstack.com" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
178 179 180 181 182 183 184
                            </div>
                            <div class="col-xs-8 text-right">
                                <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
                                <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
                                <script src="/js/script.js"></script>
                                
                                
185
                                
186 187 188 189 190 191 192 193 194
                                <script src="/js/tips.js"></script>
                                
                            </div>
                    </div>
                    <br/>
                </div>
                <div class="col-md-7 col-md-offset-3 col-xs-10 col-xs-offset-1">
                    <div id="disqus_thread"></div>
                    <script type="text/javascript" async>
195 196 197 198 199 200 201 202 203
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'varstack';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
Pallav Agarwal's avatar
Pallav Agarwal committed
204 205 206 207 208 209 210
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-21768487-2', 'auto');
ga('send', 'pageview');
211 212
                    </script>
                    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
Pallav Agarwal's avatar
Pallav Agarwal committed
213
                </div>
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
            </div>
        </div>
    </div>


    <div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span>
                        <span class="sr-only">Close</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        Image Preview
                    </h4>
                </div>
                <div class="modal-body">
                    <img src="" id="imagepreview" style="max-height: 100%; max-width: 100%;">
                </div>
            </div>
        </div>
    </div>