Skip to content

Instantly share code, notes, and snippets.

@g0xA52A2A
Last active May 19, 2021 17:42
Show Gist options
  • Save g0xA52A2A/d3d6ee27cecf0f90dd1c9daf23c536e9 to your computer and use it in GitHub Desktop.
Save g0xA52A2A/d3d6ee27cecf0f90dd1c9daf23c536e9 to your computer and use it in GitHub Desktop.

getcompletion() hell

As if string comparisons being influenced by 'ignorecase' wasn't bad enough determining what will come out of getcompletion() is a like a bag of cats.

Type Follows 'ignorecase' Force case (in)sensitivity
arglist Always insensitive With \\C
augroup Always insensitive With \\C
buffer Always insensitive With \\C
behave Always insensitive With \\C
color Always sensitive With \c
command Yes With \\C
compiler Always sensitive With \c
cscope Always insensitive With \\C
diff_buffer Always insensitive With \\C
dir Always insensitive With \C
environment Always insensitive With \\C
event Always insensitive With \\C
expression Yes With \\C
file Always insensitive With \C
file_in_path Always insensitive With \C
filetype Always sensitive With \c
function Yes With \\C
help Sort of* With \C**
highlight Always insensitive With \\C
history Always insensitive With \\C
locale Always insensitive With \\C
mapclear Always insensitive With \\C
mapping Yes With \\C
menu Yes With \\C
messages Always insensitive With \\C
option Yes With \\C
packadd Always sensitive With \c
shellcmd Always sensitive With \c
sign Always insensitive With \\C
syntax Always sensitive With \c
syntime Always insensitive With \\C
tag Yes With \\C
tag_listfiles Yes With \\C
user Always insensitive With \\C
var Yes With \\C

* Uppercase inputs can return lowercase results with noignorecase set

** A case sensitve match appears somewhere within the match, not just at the start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment