Skip to content

Instantly share code, notes, and snippets.

@rbreaves
Last active June 8, 2020 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbreaves/d6de13016c30497ac279afa222b421f3 to your computer and use it in GitHub Desktop.
Save rbreaves/d6de13016c30497ac279afa222b421f3 to your computer and use it in GitHub Desktop.
Universal OS vimrc settings
" https://vi.stackexchange.com/questions/2572/detect-os-in-vimscript
" Comment - cross-platform settings
set nocompatible
set mouse=a
" OS Specific
if has('win32')
" Windows
" arrow keys
set term=pcansi
elseif has("macunix")
" Mac
elseif has("win32unix")
" cygwin
" arrow keys
set term=builtin_ansi
elseif has("unix")
" Linux/Unix
else
" Unknown
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment