Skip to content

Instantly share code, notes, and snippets.

@decisivedevops
Last active June 10, 2023 13:19
Show Gist options
  • Save decisivedevops/d929f1bc7906baed8c55a65c9a90f23e to your computer and use it in GitHub Desktop.
Save decisivedevops/d929f1bc7906baed8c55a65c9a90f23e to your computer and use it in GitHub Desktop.
.vimrc
" Use Vim settings, rather then Vi settings. It’s important to have this on the top of your file, as it influences other options.
set nocompatible
" add a line below cursor
set cursorline
" show line numbers
set nu
set relativenumber
" Disable beep on errors
set noerrorbells
" bypass sudo when file is not opened using sudo vim <filename>
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
" status line
set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)
" show status line
set laststatus=2
" Display command line's tab complete options as a menu.
set wildmenu
" Maintain undo history between sessions
set undofile
set undodir=~/.vim/undodir
" Shortcutting split navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <c-w>l
@decisivedevops
Copy link
Author

decisivedevops commented Jun 10, 2023

cd ~
mkdir -p .vim
curl -sSLO https://gist.githubusercontent.com/decisivedevops/d929f1bc7906baed8c55a65c9a90f23e/raw/329068d051f7ee93c1619596a273d378d5b2af29/.vimrc

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