I'm having trouble creating a custom snippet that, for me, would be really useful.

I want to set up a snippet to create an unordered list nav from a plain text list, e.g.

foo
bar
coo
tar

I'd like to highlight the whole list, hit a key combo, which would wrap each list item in <li>, wrap the whole lot in <ul>, and even wrap the text within each list item in <a href=""></a> for good measure.

Can anyone help?

Many thanks in advance.