<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vim-gitcha, branch master</title>
<subtitle>Completion for Git SHAs</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/'/>
<entry>
<title>Increase version v0.0.1 -&gt; v0.0.2</title>
<updated>2017-05-10T19:12:57+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T19:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=35ef33e27af30c2bede8e63b28889c8d4a9e060f'/>
<id>35ef33e27af30c2bede8e63b28889c8d4a9e060f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add CHANGELOG</title>
<updated>2017-05-10T19:09:00+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T19:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=1a43c4492b5a41eaecdc8afb23461ec6422d2372'/>
<id>1a43c4492b5a41eaecdc8afb23461ec6422d2372</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'completeopt-menuone'</title>
<updated>2017-05-10T19:06:38+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T19:06:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=0bbf4337a6b7c6b0fc0d216a02897b5c45ebc36b'/>
<id>0bbf4337a6b7c6b0fc0d216a02897b5c45ebc36b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ftplugin/gitcommit: Restore &lt;Plug&gt; mapping</title>
<updated>2017-05-10T19:00:54+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T19:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=69a382bf1d6cd4645dfb4408f757368b069694fc'/>
<id>69a382bf1d6cd4645dfb4408f757368b069694fc</id>
<content type='text'>
Restore this after 60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113 where I made
a mess experimenting trying to get `complete()` to work.

Take the mapping that we used successfully from that commit and combine
it with our `&lt;Plug&gt;` mappings from before to call our new completion
function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Restore this after 60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113 where I made
a mess experimenting trying to get `complete()` to work.

Take the mapping that we used successfully from that commit and combine
it with our `&lt;Plug&gt;` mappings from before to call our new completion
function.
</pre>
</div>
</content>
</entry>
<entry>
<title>autoload/gitcha.vim: Remove cruft after switching to `complete()`</title>
<updated>2017-05-10T18:55:24+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T18:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=66b4ed72d3bc3a6c03049aa5364f567aab5ae980'/>
<id>66b4ed72d3bc3a6c03049aa5364f567aab5ae980</id>
<content type='text'>
Remove all the cruft from 60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113:

* Don't store user-defined 'completefunc' any more since we no longer
  change that setting.
* Remove the commented `a:findstart` code, which is no longer relevant
  since this function is no longer a 'completefunc'.
* Remove commented test &amp; debugging code
* Remove the `gitcha#StartGitSHACompletion()` function, which was there
  only to facilitate mapping to the user completion function defined in
  'completefunc' using the Vim-assigned mapping `&lt;C-x&gt;&lt;C-u&gt;`. Our map
  now directly invokes `gitcha#GitSHAComplete()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove all the cruft from 60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113:

* Don't store user-defined 'completefunc' any more since we no longer
  change that setting.
* Remove the commented `a:findstart` code, which is no longer relevant
  since this function is no longer a 'completefunc'.
* Remove commented test &amp; debugging code
* Remove the `gitcha#StartGitSHACompletion()` function, which was there
  only to facilitate mapping to the user completion function defined in
  'completefunc' using the Vim-assigned mapping `&lt;C-x&gt;&lt;C-u&gt;`. Our map
  now directly invokes `gitcha#GitSHAComplete()`.
</pre>
</div>
</content>
</entry>
<entry>
<title>gitcha#GitSHAComplete(): Use `complete()` to open popup menu (WIP)</title>
<updated>2017-05-10T03:53:57+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-10T03:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113'/>
<id>60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113</id>
<content type='text'>
Work in progress

Rough code for a working implementation using `complete()` instead of
'completefunc'.

Rejigger `start` and make a new `base` variable since we can no longer
get it as an argument.

Correctly reset 'completeopt' to its original user value after opening
the popup menu.

Return an empty string from the function as recommended by

    :h complete()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work in progress

Rough code for a working implementation using `complete()` instead of
'completefunc'.

Rejigger `start` and make a new `base` variable since we can no longer
get it as an argument.

Correctly reset 'completeopt' to its original user value after opening
the popup menu.

Return an empty string from the function as recommended by

    :h complete()
</pre>
</div>
</content>
</entry>
<entry>
<title>autoload/gitcha.vim: Set completeopt+=menuone</title>
<updated>2017-05-09T22:24:43+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-09T22:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=e7fb8f326e7c3e184e305286199640fdaac35d5b'/>
<id>e7fb8f326e7c3e184e305286199640fdaac35d5b</id>
<content type='text'>
Work in progress

Adds 'menuone' to the 'completeopt' option. This makes the popup menu
display even if there's only a single result. We want this because it
allows us to see the commit message subject for the completed SHA,
providing a way to confirm that the completed SHA is the right one.

Here, the idea was to try to save the user's 'completeopt' setting and
restore it after completion, but we can't do that in
`gitcha#GitSHAComplete` because if we do, it restores 'completeopt'
before the completion menu is shown. Thus, it cancels out our custom
`+=menuone` setting.

After checking online to see how other plugins handle this
(https://github.com/search?utf8=%E2%9C%93&amp;q=completeopt+language%3AVimL+path%3A%2Fautoload&amp;type=Code&amp;ref=advsearch&amp;l=&amp;l=),
I found that they use the `complete()` built-in function instead of
overriding the user-designated 'completefunc' setting:

https://github.com/heavenshell/vim-flood/blob/2bd8580642c56c2a090a8e44cc768e98019310be/autoload/flood/complete.vim

This allows us to add `+=menuone` before calling `complete()` and remove
the setting afterwards.

Using `complete()` seems like the way to go here, so it looks like I'm
going to have to refactor the code to do that instead in order to get
"menuone" to work.

The way I originally wrote the program was intuitive at the time. I'm
glad I did it that way, because it provided me with the knowledge of how
to remap the built-in completion mappings in Auditory.vim. Will have to
try that out at some point.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work in progress

Adds 'menuone' to the 'completeopt' option. This makes the popup menu
display even if there's only a single result. We want this because it
allows us to see the commit message subject for the completed SHA,
providing a way to confirm that the completed SHA is the right one.

Here, the idea was to try to save the user's 'completeopt' setting and
restore it after completion, but we can't do that in
`gitcha#GitSHAComplete` because if we do, it restores 'completeopt'
before the completion menu is shown. Thus, it cancels out our custom
`+=menuone` setting.

After checking online to see how other plugins handle this
(https://github.com/search?utf8=%E2%9C%93&amp;q=completeopt+language%3AVimL+path%3A%2Fautoload&amp;type=Code&amp;ref=advsearch&amp;l=&amp;l=),
I found that they use the `complete()` built-in function instead of
overriding the user-designated 'completefunc' setting:

https://github.com/heavenshell/vim-flood/blob/2bd8580642c56c2a090a8e44cc768e98019310be/autoload/flood/complete.vim

This allows us to add `+=menuone` before calling `complete()` and remove
the setting afterwards.

Using `complete()` seems like the way to go here, so it looks like I'm
going to have to refactor the code to do that instead in order to get
"menuone" to work.

The way I originally wrote the program was intuitive at the time. I'm
glad I did it that way, because it provided me with the knowledge of how
to remap the built-in completion mappings in Auditory.vim. Will have to
try that out at some point.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove TODO</title>
<updated>2017-04-29T06:14:41+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T06:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=5eca0d8f26acf29edbcc2376f6a8cd7a9d928a2f'/>
<id>5eca0d8f26acf29edbcc2376f6a8cd7a9d928a2f</id>
<content type='text'>
All tasks are complete. This file is no longer needed at the moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All tasks are complete. This file is no longer needed at the moment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update TODO</title>
<updated>2017-04-29T06:13:48+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T06:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=2aedbe2b86b827742c0cce380aa02c58131b9e98'/>
<id>2aedbe2b86b827742c0cce380aa02c58131b9e98</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ftplugin/gitcommit: Check for `b:did_ftplugin`</title>
<updated>2017-04-29T06:12:24+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T06:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-gitcha/commit/?id=33bff57b53bbf80e245cda573ed9ec83da7abf9f'/>
<id>33bff57b53bbf80e245cda573ed9ec83da7abf9f</id>
<content type='text'>
Be a good Vim citizen and don't load if `b:did_ftplugin` is already set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Be a good Vim citizen and don't load if `b:did_ftplugin` is already set.
</pre>
</div>
</content>
</entry>
</feed>
