-
-
Save marknorgren/d5835958297d8192729e5372076dff4a to your computer and use it in GitHub Desktop.
minimal vim setup for linux servers / vms + swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
if [[ -f ~/.vimrc ]] | |
then | |
echo "You already have a ~/.vimrc. Aborting to avoid losing data..." | |
exit 1 | |
fi | |
echo "installing pathogen" | |
mkdir -p ~/.vim/bundle ~/.vim/autoload | |
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
echo "installing sensible.vim..." | |
cd ~/.vim/bundle && git clone https://github.com/tpope/vim-sensible.git | |
echo "installing nerdtree.vim" | |
cd ~/.vim/bundle && git clone https://github.com/scrooloose/nerdtree.git | |
echo "installing swift.vim" | |
cd ~/.vim/bundle && git clone https://github.com/keith/swift.vim.git | |
echo "Adding contents to ~/.vimrc" | |
echo "set nocompatible | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
color delek | |
set vb | |
let mapleader = \",\" | |
set number | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
:nnoremap <leader>n :NERDTreeToggle<cr> | |
\" easier window movement | |
:nnoremap <C-H> <C-W>h | |
:nnoremap <C-J> <C-W>j | |
:nnoremap <C-K> <C-W>k | |
:nnoremap <C-L> <C-W>l | |
" > ~/.vimrc | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment