Skip to content

Instantly share code, notes, and snippets.

@AidanHanda
Created March 18, 2020 18:17
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 AidanHanda/28576605513d473de2e737ef9c5cf259 to your computer and use it in GitHub Desktop.
Save AidanHanda/28576605513d473de2e737ef9c5cf259 to your computer and use it in GitHub Desktop.
Just my VIM configuration
""" Basic Behaviour
set number "Show line numbers
set wrap "Wrap lines
set encoding=utf-8 "Encode in utf-8
set wildmenu "Enables visual autocomplete for commands
set lazyredraw "Only redraw the screen when required
set showmatch "Highlight opening and closing paranthesis
set laststatus=2 "Show the statusline
set ruler "Shows where you are
set visualbell "Blink the cursor instead of beeping when you do something wrong
" Colorscheme
colorscheme badwolf
" Filetype syntax highlighting
syntax enable
filetype plugin indent on
"""" Tab settings
set tabstop=4 " width that a <TAB> character displays as
set expandtab " convert <TAB> key-presses to spaces
set shiftwidth=4 " number of spaces to use for each step of (auto)indent
set softtabstop=4 " backspace after pressing <TAB> will remove up to this many spaces
set autoindent " copy indent from current line when starting a new line
set smartindent " even better autoindent (e.g. add indent after '{')
"""" Search settings
set incsearch " search as characters are entered
set hlsearch " highlight matches
" turn off search highlighting with <CR> (carriage-return)
nnoremap <CR> :nohlsearch<CR><CR>
" Misc settings
set cursorline
" Auto closing brackets
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
" For use at the bottom
if filereadable(expand("~/.vimrc.plug"))
source ~/.vimrc.plug
endif
call plug#begin('~/vim/plugged')
"Fugitive Vim Github Wrapper
Plug 'tpope/vim-fugitive'
call plug#end()

Setup

It's not too hard to setup first just grab both of these files and put them in your ~/ home directory.

Then you need to grab badwolf which is the theme for VIM that I'm currently using which can be done as follows:

curl -o ~/.vim/colors/badwolf.vim --create-dirs https://raw.githubusercontent.com/sjl/badwolf/master/colors/badwolf.vim

Then you should just be able to open up VIM and run

:PlugInstall

and be good to go 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment