Skip to content

Instantly share code, notes, and snippets.

@pletnes
Last active January 16, 2023 18:01
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 pletnes/1541ce8cef4281c90bf2b529c5567698 to your computer and use it in GitHub Desktop.
Save pletnes/1541ce8cef4281c90bf2b529c5567698 to your computer and use it in GitHub Desktop.
Simplest portable vimrc imaginable
set expandtab
" the filetype plugin determines filetypes from file contents
filetype plugin on
" use indent rules based on the filetype
filetype indent on
" turn on syntax highlighting
syntax on
" guess indentation
set autoindent
" be even smarter with indentation
set smartindent
" tabstops are 2 characters
set tabstop=2
" autoindent uses 2 spaces
set shiftwidth=2
" insert spaces instead of tabs
set expandtab
" smart expansion of tabs into spaces
set smarttab
" show tabs and end of line characters
set list listchars=extends:❯,precedes:❮,nbsp:␣,tab:▸\ ,eol:¬,trail:→
" highlight search hits while typing
set hlsearch
" do incremental searching
set incsearch
" ignore cases while searching for lower case strings
set ignorecase
" do not ignore cases when searching for a string containing one or more upper @
" case letters
set smartcase
" show a message when in insert and visual modes
set showmode
" show matching braces
set showmatch
" show tab lines 0: never 1: only if there are >= 2 tabs 2: always
set showtabline=1
set number
set relativenumber
" use tab to switch between buffers
noremap <tab> :bnext<enter>
noremap <s-tab> :bprevious<enter>
@pletnes
Copy link
Author

pletnes commented Jan 16, 2023

curl https://gist.githubusercontent.com/pletnes/1541ce8cef4281c90bf2b529c5567698/raw/4255a0649bcc5795ceb14254ec50b22d80898e08/.vimrc > ~/.vimrc

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