Viml platform
From wikinotes
platform info
See
:help feature-list
for full list of platformsif 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'
subprocess
let dir = system("ls -la") " Save result of command to variable let files = split(system('ls'), '\n') " Save results of ls to vimscript list