Skip to content

Instantly share code, notes, and snippets.

@lukeasrodgers
Last active August 29, 2015 13:57
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 lukeasrodgers/9833918 to your computer and use it in GitHub Desktop.
Save lukeasrodgers/9833918 to your computer and use it in GitHub Desktop.
no-plugins, generic .vimrc
" reload .vimrc when editing it: :so %
set nocompatible " be iMproved
filetype off " required!
set nu " show line numbers
set hlsearch " highlight search terms
" Clear last search highlighting
nnoremap <c-m> :noh<cr>
" Easier navigation between split windows
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
" split windows down and right
set splitbelow
set splitright
" Insert blank lines without going into insert mode
nmap go o<esc>
nmap gO O<esc>
" Shortcut for =>
imap <C-l> <Space>=><Space>
" indent/unindent visual mode selection with tab/shift+tab
vmap <tab> >gv
vmap <s-tab> <gv
set ignorecase
set smartcase " do case insensitive search
set incsearch " Find as you type search
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
set hidden " Handle multiple buffers better.
set title " Set the terminal's title
set directory=/tmp " Keep swap files in one location
set visualbell " less beeping! stop NERD tree from beeping
syntax enable
set background=dark
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
let &t_Co=256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment