Skip to content

Instantly share code, notes, and snippets.

@catleeball
Last active April 20, 2023 22:21
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 catleeball/2404b04cd00822df055c19b7bf477fe0 to your computer and use it in GitHub Desktop.
Save catleeball/2404b04cd00822df055c19b7bf477fe0 to your computer and use it in GitHub Desktop.
syntax on
" Forgot sudo, save with sudo: https://stackoverflow.com/a/7078429
cmap w!! w !sudo tee > /dev/null %
set mouse=a
set number
set relativenumber
set ruler
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set smarttab
set autoindent
set backspace=indent,eol,start
" Highlight current line
set cursorline
highlight ColorColumn ctermbg=grey guibg=grey
" 80 character vertical ruler
set colorcolumn=80
set pastetoggle=<F2>
" Normal & Insert modes: Ctrl-A == Start of line; Ctrl-E == EoL
map <C-a> <ESC>^
map <C-e> <ESC>$
imap <C-a> <ESC>I
imap <C-e> <ESC>A
" Normal & Insert modes: Meta+Left / Meta+Right forward/backward one word
map <M-Left> <S-left>
map <ESC-Left> <S-left>
map <M-Right> <S-right>
map <ESC-Right> <S-right>
imap <M-Left> <S-left>
imap <ESC-Left> <S-left>
imap <M-Right> <S-right>
imap <ESC-Right> <S-right>
set noerrorbells
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment