Skip to content

Instantly share code, notes, and snippets.

@dchest
Created January 10, 2010 23:39
Show Gist options
  • Save dchest/273864 to your computer and use it in GitHub Desktop.
Save dchest/273864 to your computer and use it in GitHub Desktop.
" Most stuff comes from all over the web.
" A lot of it is from http://items.sjbach.com/319/configuring-vim-right
" Make navigation more amenable to the long wrapping lines.
noremap k gk
noremap j gj
noremap <Up> gk
noremap <Down> gj
noremap \\ :nohlsearch<Return>
" Highlight search terms...
set hlsearch
set incsearch " ...dynamically as they are typed.
" Tab -> 2 spaces
set autoindent
set softtabstop=2
set tabstop=2
set shiftwidth=2
set expandtab
" Backups and swap
set backupdir=~/.vim/backup//
set directory=~/.vim/swp//
set history=1000
" Make % jump between end/else/if etc
runtime macros/matchit.vim
" Pretty <TAB> completion for filenames
set wildmode=list:longest
" These two options, when set together, will make /-style searches case-sensitive only if there is a capital letter in the search expression. *-style searches continue to be consistently case-sensitive.
set ignorecase
set smartcase
" Line numbers at the bottom right corner
set ruler
" The following will make tabs and trailing spaces visible when requested:
set listchars=tab:>-,trail:·,eol:$
nmap <silent> <leader>s :set nolist!<CR>
" Disable beeps
set visualbell
" o<SPACE> is transformed into find
cab o find
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment