Skip to content

Instantly share code, notes, and snippets.

@WillSams
Last active February 14, 2024 23:11
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 WillSams/d0b15fb90be15cd47d1fd32af038cb39 to your computer and use it in GitHub Desktop.
Save WillSams/d0b15fb90be15cd47d1fd32af038cb39 to your computer and use it in GitHub Desktop.
Setting up Vim in Git Bash
#/bin/sh
# https://www.linuxfordevices.com/tutorials/linux/turn-vim-into-an-ide
echo '" Setting some decent VIM settings for programming
" This source file comes from git-for-windows build-extra repository (git-extra/vimrc)
ru! defaults.vim
if has("syntax")
syntax on
endif' >| /etc/vimrc # i.e., $HOME/AppData/Local/Programs/Git/etc/vimrc
# Install Vim Plug
bash -c "curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim #-k -insecure"
# before going further, let's set up .vimrc how we like it!
echo 'set nocompatible
set tabstop=2 " Set tab width to 2 columns
set shiftwidth=2 " Use 2 columns for indentation
set expandtab " Use spaces when pressing <tab> key
set number' >| $HOME/.vimrc
# now let's add the plugins
echo "
call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'https://github.com/preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'LunarWatcher/auto-pairs'
Plug 'maxboisvert/vim-simple-complete'
Plug 'ryanoasis/vim-devicons'
Plug 'tpope/vim-surround'
Plug 'w0rp/ale'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/syntastic'
Plug 'airblade/vim-gitgutter'
Plug 'editorconfig/editorconfig-vim'
Plug 'lambdalisue/battery.vim'
Plug 'mhinz/vim-startify'
Plug 'wakatime/vim-wakatime'
call plug#end()" >> $HOME/.vimrc
# In Vim, do the following:
# :source %
# :PlugInstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment