Skip to content

Instantly share code, notes, and snippets.

@jayswan
Last active November 18, 2016 14:41
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 jayswan/b1998ac7226c08a18cb8 to your computer and use it in GitHub Desktop.
Save jayswan/b1998ac7226c08a18cb8 to your computer and use it in GitHub Desktop.
.vimrc simple
syntax enable
set ruler
set nobackup
set nocompatible
set encoding=utf-8
set showcmd
set number
set background=dark
"" Indentation
set autoindent
set smarttab
set tabstop=8
set expandtab
set softtabstop=4
set shiftwidth=4
"" if has("autocmd")
filetype on
filetype indent on
filetype plugin on
"" endif
"" Whitespace
set nowrap
set backspace=indent,eol,start
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
"" Searching
set hlsearch
set incsearch
set ignorecase
"" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
inoremap jj <ESC>
execute pathogen#infect()
colorscheme solarized
let mapleader = ","
set gdefault
set showmatch
nnoremap <leader><space> :noh<cr>
nnoremap <leader>r :set syn=ruby<cr>
nnoremap <leader>p :set paste<cr>
nnoremap <leader>n :set nopaste<cr>
nnoremap <leader>t :NERDTreeToggle
imap <C-A> <ESC>^i
imap <C-E> <ESC>A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment