Skip to content

Instantly share code, notes, and snippets.

@neilang
Created August 20, 2011 02:29
Show Gist options
  • Save neilang/1158525 to your computer and use it in GitHub Desktop.
Save neilang/1158525 to your computer and use it in GitHub Desktop.
my .vimrc
syntax on " Syntax highlight
" set backspace=2
set backspace=indent,eol,start " Fixes backspace on unix systems
set tabstop=2 " set tab width
set shiftwidth=2
set expandtab " spaces instead of tabs
set list " Show invisibles
set listchars=tab:»·,trail:·
set number " line numbers in gutter
set hlsearch " highlight the search terms
set incsearch " jump to the matches while typing
set ignorecase " ignore case while searching
set smartcase " ... unless the search term is mixed case
set showmatch " show matching braces
set autoread " reload files when they change outside vim
set smartindent " indent after { etc
set hidden " lets you switch buffers without saving first
set mouse=a " lets you use the mouse in terminal vim
filetype plugin indent on " auto-detect the filetype
set completeopt=menuone,longest " Always show the menu, insert longest match
set encoding=utf-8
set nu
nmap Q q
nmap q <esc>
@jcartledge
Copy link

you might like these:

set hidden      " lets you switch buffers without saving first
set mouse=a     " lets you use the mouse in terminal vim
set autoread    " reload files when they change outside vim
set incsearch   " search as you type
set hlsearch    " highlight matches - <esc>:noh to clear the highlight
set showmatch   " highlight matching braces when the cursor is on them
set autoindent  " indent based on the previous line
set smartindent " indent after { etc
set ignorecase  " case insensitive search ...
set smartcase   " ... unless the search term is mixed case
set encoding=utf-8 " just do this

also if you're going to set list, try something like:

set listchars=tab:»·,trail:·

@neilang
Copy link
Author

neilang commented Sep 1, 2011

Thanks! I do like those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment