<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vim-grappele/plugin, branch master</title>
<subtitle>Vim plugin to repeat the last G movement</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/'/>
<entry>
<title>plugin/grappele.vim: Add mode to `hasmapto()` call</title>
<updated>2020-09-28T23:51:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-28T23:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=560239bbd9afb7dbf7ce846160bd687b1cfda03f'/>
<id>560239bbd9afb7dbf7ce846160bd687b1cfda03f</id>
<content type='text'>
Since these `&lt;Plug&gt;` mappings are mode-specific, ensure we specify the
mode in the `hasmapto()` call.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since these `&lt;Plug&gt;` mappings are mode-specific, ensure we specify the
mode in the `hasmapto()` call.
</pre>
</div>
</content>
</entry>
<entry>
<title>grappele#Recall(): Remove special handling for visual mode</title>
<updated>2020-09-28T23:34:07+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-28T23:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=f8bbf6e991d6a5d9768715c0cc915875bc9d9bc9'/>
<id>f8bbf6e991d6a5d9768715c0cc915875bc9d9bc9</id>
<content type='text'>
Now that this is an `&lt;expr&gt;` mapping, we don't need any special handling
for visual mode as this will be taken care of automatically.

Remove the `mode` argument as it's no longer used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that this is an `&lt;expr&gt;` mapping, we don't need any special handling
for visual mode as this will be taken care of automatically.

Remove the `mode` argument as it's no longer used.
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin/grappele.vim: Remove `&lt;Plug&gt;Grappele` mapping</title>
<updated>2020-09-28T23:33:54+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-28T23:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=145c155e419fdcc73129771d8fbb3c32a77295a8'/>
<id>145c155e419fdcc73129771d8fbb3c32a77295a8</id>
<content type='text'>
Since the plugin doesn't use this mapping any more due to the
performance delay, let's remove it. Tells people that it shouldn't be
used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the plugin doesn't use this mapping any more due to the
performance delay, let's remove it. Tells people that it shouldn't be
used.
</pre>
</div>
</content>
</entry>
<entry>
<title>grappele#Grappele(): Remove varargs</title>
<updated>2020-09-28T23:28:24+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-28T23:12:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=47a6ae90ca533f32576c88b21b988d92d33f865c'/>
<id>47a6ae90ca533f32576c88b21b988d92d33f865c</id>
<content type='text'>
This function no longer needs any extra arguments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function no longer needs any extra arguments.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change v_gG and o_gG to &lt;expr&gt; mappings</title>
<updated>2020-09-28T23:17:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-28T23:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=b39b957b700e98035dd8aa7608feab71d6181c95'/>
<id>b39b957b700e98035dd8aa7608feab71d6181c95</id>
<content type='text'>
Fix visual mode bug where when the cursor is at the top of a visual
selection, pressing `gG` changes the bottom of the visual selection
instead of the top.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix visual mode bug where when the cursor is at the top of a visual
selection, pressing `gG` changes the bottom of the visual selection
instead of the top.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `gG` omap by removing count</title>
<updated>2020-09-28T23:17:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-26T20:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=e07089624f0f8b8ba3f024bbf3c0c1a735522d06'/>
<id>e07089624f0f8b8ba3f024bbf3c0c1a735522d06</id>
<content type='text'>
Previously, if we stored a number in `s:line`, for example with `17G`,
then `&gt;gG` would cause lines .,17 to be indented 17 times due to the use
of `V`.

When I removed `V` from the omap, any commands using `gG` operated
characterwise, when they should operate linewise.

Found this answer from Liu Sha
(https://stackoverflow.com/users/7026980/liu-sha)
https://stackoverflow.com/questions/4261177/discarding-count-in-expr-mappings/53182922#53182922
that shows how to discard the count for different types of mappings:

&gt; nnoremap &lt;expr&gt; s "@_" . ToNthSpace()
&gt; vnoremap &lt;expr&gt; s "@_" . ToNthSpace()
&gt; onoremap &lt;expr&gt; s printf(":normal %s\&lt;cr&gt;", ToNthSpace())

The `:normal!` looks like it discards the count, so this gives us what
we want. Adapted the suggestion into a new `&lt;expr&gt;` omap that indents
only once for e.g. .,17.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if we stored a number in `s:line`, for example with `17G`,
then `&gt;gG` would cause lines .,17 to be indented 17 times due to the use
of `V`.

When I removed `V` from the omap, any commands using `gG` operated
characterwise, when they should operate linewise.

Found this answer from Liu Sha
(https://stackoverflow.com/users/7026980/liu-sha)
https://stackoverflow.com/questions/4261177/discarding-count-in-expr-mappings/53182922#53182922
that shows how to discard the count for different types of mappings:

&gt; nnoremap &lt;expr&gt; s "@_" . ToNthSpace()
&gt; vnoremap &lt;expr&gt; s "@_" . ToNthSpace()
&gt; onoremap &lt;expr&gt; s printf(":normal %s\&lt;cr&gt;", ToNthSpace())

The `:normal!` looks like it discards the count, so this gives us what
we want. Adapted the suggestion into a new `&lt;expr&gt;` omap that indents
only once for e.g. .,17.
</pre>
</div>
</content>
</entry>
<entry>
<title>Trying to fix omap (WIP)</title>
<updated>2020-09-28T23:15:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-26T11:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=802d388c9dcc1c75b0acd8bcfe75cbd66c76838d'/>
<id>802d388c9dcc1c75b0acd8bcfe75cbd66c76838d</id>
<content type='text'>
gG omap works characterwise but should work linewise.
Adding V to the gG omap causes &gt;17G to indent 17 times instead of once.

Try changing `G` to an `&lt;expr&gt;` mapping to simplify the code, allowing
it to work more exactly like the normal `G`. This resulted in moving the
logic to `grappele#Recall()`, causing problems for `gG`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gG omap works characterwise but should work linewise.
Adding V to the gG omap causes &gt;17G to indent 17 times instead of once.

Try changing `G` to an `&lt;expr&gt;` mapping to simplify the code, allowing
it to work more exactly like the normal `G`. This resulted in moving the
logic to `grappele#Recall()`, causing problems for `gG`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add operator pending and visual mode `G` mappings</title>
<updated>2020-09-20T21:48:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-09-20T21:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=3483e377e93e6381e2fea236ceb0e7d2991aa29e'/>
<id>3483e377e93e6381e2fea236ceb0e7d2991aa29e</id>
<content type='text'>
I previously added o- and v-maps for the `gG` mapping, but hadn't done
so for `G`.

This change allows us to reuse lines given to `G` from other modes. For
example:

    173&gt;&gt;..ygG

Didn't use `&lt;Plug&gt;` mappings here because after testing them, there was
a noticeable delay. Found 07a75d523eadaf1027aa8bf287256602ad05f97f,
which describes a performance penalty, so used direct mappings instead.

Kept the `&lt;Plug&gt;Grappele` mapping for a measure of backward
compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I previously added o- and v-maps for the `gG` mapping, but hadn't done
so for `G`.

This change allows us to reuse lines given to `G` from other modes. For
example:

    173&gt;&gt;..ygG

Didn't use `&lt;Plug&gt;` mappings here because after testing them, there was
a noticeable delay. Found 07a75d523eadaf1027aa8bf287256602ad05f97f,
which describes a performance penalty, so used direct mappings instead.

Kept the `&lt;Plug&gt;Grappele` mapping for a measure of backward
compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add operator-pending and visual mode mappings</title>
<updated>2018-12-13T12:49:40+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-12-13T12:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=1926fc6c9fb6f724660a495f23afccc0830de069'/>
<id>1926fc6c9fb6f724660a495f23afccc0830de069</id>
<content type='text'>
New mappings that allow the stored `G` position to be used in both
visual mode and operator-pending mode for greater flexibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New mappings that allow the stored `G` position to be used in both
visual mode and operator-pending mode for greater flexibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin/grappele.vim: Silence `G` mapping</title>
<updated>2015-09-17T03:09:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-17T03:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=6feb0b0be638e2a4d28ef58106dccfdc3c183278'/>
<id>6feb0b0be638e2a4d28ef58106dccfdc3c183278</id>
<content type='text'>
Don't output the mapping result in the command line when using the `G`
command.

Was handling this prevously with the `&lt;Plug&gt;Grappele` mapping but not
with the new one that I added in
07a75d523eadaf1027aa8bf287256602ad05f97f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't output the mapping result in the command line when using the `G`
command.

Was handling this prevously with the `&lt;Plug&gt;Grappele` mapping but not
with the new one that I added in
07a75d523eadaf1027aa8bf287256602ad05f97f.
</pre>
</div>
</content>
</entry>
</feed>
