How to list source code of store procedures?

To list source code one can call dbo.sp_helptext '<store procedure>' to list code.

Example:
exec dbo.sp_helptext 'sp_databases'

Text
—————————–
create procedure sys.sp_databases
as
set nocount on

select
….

Another way of viewing code is to query syscomments but it doesn’t format the output.
Example:
select so.name, text
FROM syscomments sc, sysobjects so
where so.id = sc.id
and name = 'sp_databases'
order by number, colid