I told him, “Sure I would,” and left.
Not sure what the technical term for this is, but I see it basically as the equivalent of continued dialogue. Can I do this?
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
Yes, the format you have used is correct.
When adding dialogue, you separate it from the initial clause with a comma outside of the quotes--outside because it's not part of what was said:
I told him, "Sure...
Note that the first letter of the first word of the dialogue is capitalized.
When adding additional detail, you add a comma inside the quotes and then add the detail outside the quotes. This only applies to commas. You should not omit other punctuation that adds meaning or clarity to the sentence, such as an exclamation point or question mark:
..."Sure I would," and left.
Note that the first letter of the first word after the dialogue is lowercase, no matter the punctuation that ends the dialogue, so long as the dialogue doesn't end with an action verb.