Last active
January 16, 2023 18:01
-
-
Save pletnes/1541ce8cef4281c90bf2b529c5567698 to your computer and use it in GitHub Desktop.
Simplest portable vimrc imaginable
This file contains hidden or 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
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> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl https://gist.githubusercontent.com/pletnes/1541ce8cef4281c90bf2b529c5567698/raw/4255a0649bcc5795ceb14254ec50b22d80898e08/.vimrc > ~/.vimrc