Skip to content

Instantly share code, notes, and snippets.

@Alexnder
Last active May 7, 2016 20:56
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 Alexnder/b0c1964757c5f22c6900699f463e7201 to your computer and use it in GitHub Desktop.
Save Alexnder/b0c1964757c5f22c6900699f463e7201 to your computer and use it in GitHub Desktop.
vim install & configure

create ~/.vimrc

cat > ~/.vimrc <<EOF
" activates filetype detection
filetype plugin indent on

" activates syntax highlighting among other things
syntax on

" allows you to deal with multiple unsaved
" buffers simultaneously without resorting
" to misusing tabs
set hidden

" just hit backspace without this one and
" see for yourself
set backspace=indent,eol,start
EOF

nginx

mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O nginx.vim
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment