<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vim-grappele/plugin, branch v0.0.1</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: Fix performance issue with `G`</title>
<updated>2015-09-14T09:01:12+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-14T09:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=07a75d523eadaf1027aa8bf287256602ad05f97f'/>
<id>07a75d523eadaf1027aa8bf287256602ad05f97f</id>
<content type='text'>
Looked into the performance issues I was having with the `G` command.
After a little profiling and then messing around with

    let start = reltime() | &lt;do stuff&gt; | echom reltimestr(reltime(start))

Using the `reltime` method I discovered that `grappele#Grappele()` was
running pretty quick (~60 time units). I then ran it around the

    :&lt;c-u&gt;call grappele#Grappele(v:count)&lt;cr&gt;

part of the mapping and found that it took about 130 time units.

Then doing

    nnoremap G :let start = reltime() \| execute 'normal! G' | echom reltimestr(reltime(start))

was pretty quick.

With that information, I decided to try a direct mapping bypassing the
`&lt;Plug&gt;` mapping just to see what that would do. Turns out the custom
`G` command works much faster with this method for some reason. In terms
of feel it's as fast as the normal `G` command.

Replacing the `&lt;Plug&gt;` mapping with the direct one for speed. Not really
sure what the reason for this is but I'm glad the performance is up to
snuff and actually usable now.

I'm testing this on OS X 10.8.5 with the stock Vim (7.3 (2010 Aug 15,
compiled Jun 20 2012 13:16:02)). Also noticed this issue on my Debian
server which I just found out uses the same version of Vim (7.3 (2010
Aug 15, compiled May  4 2012 04:25:35)).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looked into the performance issues I was having with the `G` command.
After a little profiling and then messing around with

    let start = reltime() | &lt;do stuff&gt; | echom reltimestr(reltime(start))

Using the `reltime` method I discovered that `grappele#Grappele()` was
running pretty quick (~60 time units). I then ran it around the

    :&lt;c-u&gt;call grappele#Grappele(v:count)&lt;cr&gt;

part of the mapping and found that it took about 130 time units.

Then doing

    nnoremap G :let start = reltime() \| execute 'normal! G' | echom reltimestr(reltime(start))

was pretty quick.

With that information, I decided to try a direct mapping bypassing the
`&lt;Plug&gt;` mapping just to see what that would do. Turns out the custom
`G` command works much faster with this method for some reason. In terms
of feel it's as fast as the normal `G` command.

Replacing the `&lt;Plug&gt;` mapping with the direct one for speed. Not really
sure what the reason for this is but I'm glad the performance is up to
snuff and actually usable now.

I'm testing this on OS X 10.8.5 with the stock Vim (7.3 (2010 Aug 15,
compiled Jun 20 2012 13:16:02)). Also noticed this issue on my Debian
server which I just found out uses the same version of Vim (7.3 (2010
Aug 15, compiled May  4 2012 04:25:35)).
</pre>
</div>
</content>
</entry>
<entry>
<title>Create G recall command</title>
<updated>2015-09-13T20:41:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:41:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=8e206e6d4ad49d70e4adc2b79feea4bbc426a3f2'/>
<id>8e206e6d4ad49d70e4adc2b79feea4bbc426a3f2</id>
<content type='text'>
* Add mapping for the recall command. Using `gG` because it's quick,
  easy to remember, and doesn't appear to be used for anything.
* Create `grappele#Recall()` function that goes to the last `G` count
* Store the most recent count passed into `G`

Using the recall command, you can `G` to the same count that you
previously used no matter what buffer you're now in.

TODO: The `G` command appears to be running slowly now for whatever
reason. Investigate what's going on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add mapping for the recall command. Using `gG` because it's quick,
  easy to remember, and doesn't appear to be used for anything.
* Create `grappele#Recall()` function that goes to the last `G` count
* Store the most recent count passed into `G`

Using the recall command, you can `G` to the same count that you
previously used no matter what buffer you're now in.

TODO: The `G` command appears to be running slowly now for whatever
reason. Investigate what's going on.
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin/grappele.vim: Silence mapping</title>
<updated>2015-09-13T20:29:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=edbfd44a582cd6c8782c097f0a021d70d0de5ec0'/>
<id>edbfd44a582cd6c8782c097f0a021d70d0de5ec0</id>
<content type='text'>
Otherwise the mapped command is printed on the command line which isn't
necessary and adds visual noise and distraction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise the mapped command is printed on the command line which isn't
necessary and adds visual noise and distraction.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replicate n_G functionality</title>
<updated>2015-09-13T20:28:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=059cffa4d69ecfde1c13268413b92bef1de4f4d1'/>
<id>059cffa4d69ecfde1c13268413b92bef1de4f4d1</id>
<content type='text'>
Go to the end of the buffer when typed with no count, otherwise go to
the line specified by `v:count`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Go to the end of the buffer when typed with no count, otherwise go to
the line specified by `v:count`.
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin/grappele.vim: Fix mapping (add missing &lt;cr&gt;)</title>
<updated>2015-09-13T20:08:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=3620ae942d88ea22d677cea4fa5dab7b10923df0'/>
<id>3620ae942d88ea22d677cea4fa5dab7b10923df0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin/grappele.vim: Fix &lt;Plug&gt; mapping definition</title>
<updated>2015-09-13T20:04:37+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=9e821d913b25cd07577dc08fa9db604c6cf2d84f'/>
<id>9e821d913b25cd07577dc08fa9db604c6cf2d84f</id>
<content type='text'>
Should be mapping `&lt;Plug&gt;Grappele` to the function call. `G` doesn't
belong in this map call. That's what the one at the end is for.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Should be mapping `&lt;Plug&gt;Grappele` to the function call. `G` doesn't
belong in this map call. That's what the one at the end is for.
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial commit. Project setup.</title>
<updated>2015-09-13T20:00:45+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-13T20:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-grappele/commit/?id=59e8032b2b31dc06c60842bbf975effec6820958'/>
<id>59e8032b2b31dc06c60842bbf975effec6820958</id>
<content type='text'>
* Basic setup for the plugin:
    * `loaded` global
    * Create mapping definition based on style from tpope and System
      Copy
* Create dummy function in autoload
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Basic setup for the plugin:
    * `loaded` global
    * Create mapping definition based on style from tpope and System
      Copy
* Create dummy function in autoload
</pre>
</div>
</content>
</entry>
</feed>
