Skip to content

Instantly share code, notes, and snippets.

@GeorgeHernandez
Last active December 10, 2022 18:13
Show Gist options
  • Save GeorgeHernandez/4a740ace2144f9ada6a490486a6231dc to your computer and use it in GitHub Desktop.
Save GeorgeHernandez/4a740ace2144f9ada6a490486a6231dc to your computer and use it in GitHub Desktop.
My basic vimrc file to configure Vim
" This is a vimrc file.
" Comments start with a double quote
" Key ASCII:
" 9: HT, 10: LF, 13: CR
" 32- 64: !"#$%&'()*+,-./0123456789:;<=>?@
" 65- 96: ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
" 97-126: abcdefghijklmnopqrstuvwxyz{|}~
" Disable compatibility with vi because it can cause unexpected issues
set nocompatible
" Enable file type detection
filetype on
filetype plugin on
syntax on
" Turn on line numbers
set number
" Highlight the cursor
set cursorline
" set cursorcolumn " too annoying for me
" Indentation
set tabstop=2 " hard tab size
set softtabstop=2 " soft tab size
set shiftwidth=2 " indent size
set expandtab " use spaces instead of tabs
set autoindent " use indent from current line for next
" Turn off auto backups
set nobackup
" Highlight chars as you type while searching through a file incrementally
set incsearch
" Ignore case during search
set smartcase
" Show the Vim mode at the bottom left
set showmode
" Status line at the bottom right
set statusline=
set statusline+=\ %F\ %M\ %Y\ %R
set statusline+=%=
set statusline+=\ Char\ %b\ (0x%B)\ \ Ln\ %l\ Col\ %c\ \ File\ %p%%
set laststatus=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment