Vim script: Functions

Functions in Vim script starts with the function keyword and ends with the endfunction keyword. :function PrintMessage() :echo “Hello World” :endfunction To run this function use the call command: :call PrintMessage() Function names User-defined functions in Vim script must start with a capital letter unless they are explicitly scoped. This is to prevent name conflicts

Vim script: Functions Read More »