Skip to content

Instantly share code, notes, and snippets.

@nakaz
Created September 24, 2016 00:26
Show Gist options
  • Save nakaz/29476ba006b6c378a732b3e5b548cd1f to your computer and use it in GitHub Desktop.
Save nakaz/29476ba006b6c378a732b3e5b548cd1f to your computer and use it in GitHub Desktop.
Simple vim runcom file for comfortable server editing
" Break away from vi
set nocompatible
" Map Leader to space
let mapleader = "\<Space>"
let g:mapleader = "\<Space>"
" Basic Stuff
set number
set relativenumber
set cursorline
set colorcolumn=0
set autoread
" Text & Fonts
set encoding=utf8
"Use UNIX first
set ffs=unix,dos,mac
"Moves through long lines as normal line
map j gj
map k gk
" Tabs and Spacing
set expandtab
set smarttab
set shiftwidth=2
set tabstop=2
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
" Exit insert mode with `jk`
inoremap jk <ESC>
" Fast Saving
nmap <leader>w :w!<cr>
" Quick Quit
map <leader>qq :q<cr>
" Quick file reload
map <leader>r :e<cr>
" Indent/Unindent
noremap > >>
noremap < <<
vnoremap > >gv
vnoremap < <gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment