(g) Vim 7.x :: It is possible to trick Vim into allowing lowercase user commands

It doesn’t matter to print

:My_custom_foobar() 

instead

 :My_custom_foobar() 

but it's just weird, considering how nearly all other aspects of Vim are so extensible. Some searches for the answer did not get much, but I know that this is possible without having to recompile Vim from the source. Does anyone know a way to do this?

+4
source share
2 answers

Perhaps try mapping .

 nnoremap <Leader>f :call My_custom_foobar()<CR> 

You must do this one function at a time. Not sure how you are going to do this for all functions. I say stick to the convention and type a capital letter for the function name.

+2
source

You can do this with: abbrev, but it really is not recommended. The reason you cannot do this is due to: 1) vi compatibility, 2) future expansion.

Point 2 is a big problem - if you can write functions, then there is no guarantee that you will not name a name that later conflicts with the built-in function, and this is simply not allowed. You will get errors when you try to load a function.

+2
source

All Articles