Viml platform

From wikinotes

platform info

See :help feature-list for full list of platforms

if has('gui_running') " If running gvim
if has('unix')        " If running on *nix
if has('win32')       " If running windows
if has('win32unix')   " If running cygwin/msys

if has('osx')
if has(osxdarwin')

environment variables

let home = $HOME      " accessible with '$' prefix (regardless of platform)
let $PATH .= ':/foo:/bar'


let dir = system("ls -la")             " Save result of command to variable
let files = split(system('ls'), '\n')  " Save results of ls to vimscript list