Skip to content

Instantly share code, notes, and snippets.

@jillesme
Last active August 29, 2015 14:06
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 jillesme/e2c2b677297ea5cb54db to your computer and use it in GitHub Desktop.
Save jillesme/e2c2b677297ea5cb54db to your computer and use it in GitHub Desktop.
source ~/.vundle
" -- DEFAULTS --
" UTF-8 encoding
set encoding=utf-8
cd ~/Sites
" Set leader key to ,
let mapleader=","
" Don't close buffers, hide them
set hidden
" Show line numbers
set number
" Wrap the line
set wrap
" <tab> is two spaces
set tabstop=2
" Spaces to use for autoindenting
set shiftwidth=2
" Tabs are spaces
set expandtab
" Make backspace behave better
set backspace=indent,eol,start
" Copy indent from current line when starting a new line
set autoindent
" Copy the indent style of the whole file
set copyindent
" copy the previous indentation on autoindenting
set shiftround
" Highlight matching parenthesis
set showmatch
" Search case-insensitive
set ignorecase
" Unless first character is uppercase
set smartcase
" Insert shiftwidth amount of spaces before a line
set smarttab
" Start searching while typing
set incsearch
" Remember 1000 commands
set history=1000
" Undo 1000 moves
set undolevels=1000
" Show suggestions in the menu
set wildmenu
" Ignore these files when completing
set wildignore=*.swp,*.bak,*.pyc,*.class
" Change terminal title to current file
set title
" Don't overwrite file permissions and systemlinks
set backupcopy=yes
" Refresh files if changed from the outside
set autoread
" No sounds, ever
set visualbell
set noerrorbells
" Display some characters
set list
set listchars=tab:⦊·,trail:·,extends:#,nbsp:·
" Don't backup files, or use swap files
set nobackup
" Change working directory to current file
set autochdir
" No .swp files
set noswapfile
" Foldings
set foldmethod=marker
set foldmarker={,}
set foldlevel=1
" -- GUI --
set background=dark
colorscheme base16-tomorrow
set guifont=Droid\ Sans\ Mono\ for\ Powerline:h16
set t_Co=256
set laststatus=2
syntax on
" -- MAPPINGS --
nnoremap <leader>f :CtrlP<CR>
nnoremap <leader>F :CtrlPMRU<CR>
nnoremap <leader>b :CtrlPBuffer<CR>
nnoremap <leader>a :Ack!<space>
nnoremap <leader>q :bd!<CR>
nnoremap <leader>uf :set foldlevel=99<CR>
nnoremap <leader>uu :set foldlevel=1<CR>
nnoremap <right> :bn<CR>
nnoremap <left> :bp<CR>
nnoremap <space> za
vnoremap <space> zf
" -- PLUGIN SETTTINGS --
let g:airline_theme="base16"
let g:ctrlp_custom_ignore = '\v[\/](Applications|Dropbox|Library|Music|Movies)$'
let g:UltiSnipsExpandTrigger="<c-tab>"
let g:UltiSnipsListSnippets="<down>"
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" -- AUTO COMMANDS --
au BufRead,BufNewFile ~/.vundle set filetype=vim
" Automatically close preview window
au CursorMovedI * if pumvisible() == 0|pclose|endif
au InsertLeave * if pumvisible() == 0|pclose|endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment