Last active
November 9, 2020 01:42
-
-
Save shiqimei/9189f0f9a9e6c35b1106909e022a2214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" VimScript callback pattern | |
function Callback(name) | |
echom 'Hello, My name is' | |
echom a:name | |
endfunction | |
function Main(name, callback) | |
call a:callback(a:name) | |
endfunction | |
call Main('Shiqi Mei', function('Callback')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment