Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim multiply ints #215

Merged
merged 3 commits into from
Oct 30, 2018
Merged

Vim multiply ints #215

merged 3 commits into from
Oct 30, 2018

Conversation

igemnace
Copy link
Contributor

Please describe your program and how to run it.

A one-liner function for multiplying two Numbers without any arithmetic/bitshift operators. See #144.

Requires Vim 8.0 or later for lambda syntax. Lambda is used because otherwise, function definition in VimL will require at least 3 lines due to :function {name} and :endfunction boilerplate.

To run:

  1. Source the file. Run :source vim/multiply_ints.vim from a Vim instance, or open Vim with vim -S vim/multiply_ints.vim.
  2. Print a quick multiplication. Run :echo Multiply(3, 5). Vim will echo back 15.

What Programming Language?

VimL.

A one-line function in VimL that multiplies two ints a and b without any
arithmetic/bitwise operators.
@wzhouwzhou wzhouwzhou added hacktoberfest-accepted Hacktoberfest! Lang: Vim Contributions made in Vimscript labels Oct 30, 2018
@wzhouwzhou wzhouwzhou merged commit 177f52a into wzhouwzhou:master Oct 30, 2018
@wzhouwzhou
Copy link
Owner

Thank you for creating the first Vim contribution in this repository!

@wzhouwzhou wzhouwzhou added the Lang: First Contributor First program of a certain language in this repository label Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest! Lang: First Contributor First program of a certain language in this repository Lang: Vim Contributions made in Vimscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants