Skip to content

Instantly share code, notes, and snippets.

@moronkreacionz
Created August 28, 2018 13:04
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 moronkreacionz/9e7c7c6500ab8148c46bce480fe8e666 to your computer and use it in GitHub Desktop.
Save moronkreacionz/9e7c7c6500ab8148c46bce480fe8e666 to your computer and use it in GitHub Desktop.
Ideal configurations for VimRC
cat .vimrc
" ================ Turn on syntax highlighting
syntax on
" ================ For plugins to load correctly
filetype plugin indent on
" ================ Show line numbers
set number
" ================ Show file stats
set ruler
" ================ Encoding
set encoding=utf-8
" ================ Turn Off Swap Files ==============
set noswapfile
set nobackup
set nowb
" ================ Whitespace
set wrap
set textwidth=79
set formatoptions=tcqrn1
set noshiftround
set linebreak "Wrap lines at convenient points
" ================ Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" ================ Indentation ======================
set autoindent
set smartindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
" ================= Allow hidden buffers
set hidden
" ================= Rendering
set ttyfast
" ================= Status bar
set laststatus=2
" ================= Last line
set showmode
set showcmd
set autoread "Reload files changed outside vim
set visualbell "No sounds
set hidden
set confirm
" Better command-line completion
set wildmenu
" ================= Searching
nnoremap / /\v
vnoremap / /\v
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
map <leader><space> :let @/=''<cr> " clear search
" ================ Scrolling ========================
set scrolloff=8 "Start scrolling when we're 8 lines away from margins
set sidescrolloff=15
set sidescroll=1
" ================ END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment