★ FeaturedVim🤖 AI-generated
Sane Vim Defaults (no plugins)
A solid, well-commented base for plain Vim — no plugins at all. Sensible options, leader mappings, persistent undo history and a custom status line.
by @vimrc.de · ★ 60 · ⬇ 1 copies · #minimal #no-plugins #starter #statusline
install
curl -L https://vimrc.de/r/sane-vim-defaults-no-plugins -o ~/.vimrc
" ============================================================
" Sane Vim Defaults — completely plugin-free
" A solid base for plain Vim. Well commented.
" ============================================================
" --- Basics ---
set nocompatible " Vim mode instead of Vi
filetype plugin indent on " filetype detection + plugins + indent
syntax enable " syntax highlighting
set encoding=utf-8
set hidden " keep buffers in the background
set autoread " reload file when changed externally
set mouse=a " mouse usable everywhere
set ttyfast
set lazyredraw
" --- Display ---
set number relativenumber " absolute + relative line numbers
set cursorline
set scrolloff=8 " context lines around the cursor
set sidescrolloff=8
set signcolumn=yes
set showcmd
set noshowmode " mode is shown in the status line
set laststatus=2
set wildmenu " better command-line completion
set wildmode=longest:full,full
set splitright splitbelow " new splits to the right/below
" --- Search ---
set ignorecase smartcase " case-insensitive, unless uppercase is used
set incsearch hlsearch
" --- Indentation ---
set expandtab
set tabstop=4 softtabstop=4 shiftwidth=4
set autoindent smartindent
set shiftround
" --- Files & undo ---
set noswapfile nobackup nowritebackup
set undofile
set undodir=~/.vim/undodir
set updatetime=300
if !isdirectory($HOME . '/.vim/undodir')
call mkdir($HOME . '/.vim/undodir', 'p')
endif
" --- Leader & mappings ---
let mapleader = " "
nnoremap <leader><space> :nohlsearch<CR>
nnoremap <leader>w :write<CR>
nnoremap <leader>q :quit<CR>
inoremap jk <Esc>
nnoremap j gj
nnoremap k gk
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
vnoremap < <gv
vnoremap > >gv
nnoremap <leader>j :m .+1<CR>==
nnoremap <leader>k :m .-2<CR>==
" --- netrw (built-in file browser) ---
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_winsize = 25
nnoremap <leader>e :Lexplore<CR>
" --- Compact, informative status line ---
set statusline=%f\ %m%r%=%y\ %l:%c\ %P
NORMAL74 linesvim
No comments yet. Be the first.