Using glview
Go to expert compile mode, and make a new configuration (called it glview).
Then click new, and enter in this:
Command: $bsp_exe
Parameters: -glview $path\$file.$ext
Check the box "Use Long Filenames"
Check "Ensure post-file exists" and in the box type in: $path\$file.gl
Check "Use Process Window"
That one is done.

- Example1: -game c:/steam/steamapps/sourcemods/insurgency -glview $path\$file.$ext
- Example2: -game c:/steam/steamapps/counter-strike source/cstrike -glview $path\$file.$ext

- Example: -game "c:/program files/steam/steamapps/sourcemods/insurgency" -glview $path\$file.$ext
Now click new, and click "Cmds" and then "Executeable" and find glview.exe
It's located at either \YourSteamUserDirectory\sourcesdk\bin\ep1\bin\glview.exe or \YourSteamUserDirectory\sourcesdk\bin\organgebox\bin\glview.exe, depending on if you're working on a Half-Life2: Episode 1 mod or Orange Box mod.
Parameters: -portals $path\$file.gl
Check the box for "Long File Names"
Check the box for "Use Process Window"

- Example1: -game c:/steam/steamapps/sourcemods/insurgency -portals $path\$file.gl
- Example2: -game c:/steam/steamapps/counter-strike source/cstrike -portals $path\$file.gl

- Example: -game "c:/program files/steam/steamapps/sourcemods/insurgency" -portals $path\$file.gl