Not much information out there on what you can put in the autoexec. But here is what I have in mine.
//# game & script settings
mm_dedicated_search_maxping 100 //# maximum acceptable ping for dedicated servers
cl_timeout 60 //# a workaround for server disconnecting prematurely before map load
cl_updaterate "30" //# packets per second you request from the server (default 20)
cl_cmdrate "30" //# command packets sent to server per second (default 30)
cl_interp "0.067" //# interpolation value to match updaterate 30 (default 0.1)
rate "30000" //# max bytes/sec the host can receive data (default 10000)
sv_search_key nervous //# search for Nervous Energy servers when starting game from lobby
//# key binds
bind "F11" "disconnect" //# ragedisconnect
bind "F12" "quit" //# ragequit
To make an autoexec, go to Steam/steamapps/common/left 4 dead 2/left4dead2/cfg/ create a text file and name it "autoexec.cfg" and paste the above code.