Age | Commit message (Collapse) | Author |
|
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 `<Plug>` mappings from before to call our new completion
function.
|
|
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()
|
|
Be a good Vim citizen and don't load if `b:did_ftplugin` is already set.
|
|
Clean up the check for `g:no_plugin_maps` based on this style from
tpope's gitrebase.vim:
https://github.com/tpope/vim-git/blob/5fcaf2b4f66cd28984cf4fe814d7803bbf073a12/ftplugin/gitrebase.vim
|
|
Allow the plugin's actions to be undone. Will be executed automatically
when users change the filetype, as explained here:
:h undo_ftplugin
|
|
Instead of forcing the mapping '<C-x><C-s>' to activate Git SHA
completion, allow users to define a different custom mapping.
|
|
Don't force our functions to be loaded when the ftplugin is loaded. Be
good Vimscript citizens and respect load performance.
|
|
To ensure that we don't conflict with the real "gitcommit" ftplugin,
move ours into a new custom file.
As described in
:h ftplugin-name
we can create additional ftplugins for the same filetype by putting our
script in a directory named for the filetype.
|