Find file
Fetching contributors…
Cannot retrieve contributors at this time
139 lines (106 sloc) 3.31 KB
source $HOME/.dotfiles/vim/bundles.vim
syntax on
filetype plugin indent on
" Don't have to be vi-compatible
set nocompatible
set number
" If you would like numbers relative to your current line
" set relativenumber
set ruler
" Set default encoding
set encoding=utf-8
" Whitespace stuff
set nowrap
set tabstop=2 " Display <Tab>s as 2-spaces.
set shiftwidth=2 " Shift operations should use the same amount.
"set softtabstop=2 " Use a mixture of spaces and <Tab>s to complete editing operations
set expandtab
set list listchars=tab:▸\ ,eol:¬,trail:•
" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
set gdefault " automatically set "/g" at the end of :substution commands
nnoremap / /\v
vnoremap / /\v
" Auto formatting
set autoindent " automatically indent text
set formatoptions+=n1 " add formatting numbered list to autoformat
" Spelling options
set spell spelllang=en_us
set ttyfast " using a fast terminal
inoremap jj <ESC>
" Tab completion
set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*
" Status bar
set laststatus=2
" Remember last location in file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,} set ft=ruby
au BufRead,BufNewFile {*.md} set ft=markdown
au FileType text set wrap wrapmargin=2 tabstop=8 shiftwidth=8 textwidth=72
" Make Python follow PEP8 ( )
au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
" Allow backspacing over everything in insert mode
set backspace=indent,eol,start
" remap <F1> to turning off search highlighting (default: help)
map <F1> :nohl<CR>
imap <F1> <ESC>:nohl<CR> i
" Use modeline overrides
set modeline
set modelines=10
" Directories for swp files
set backupdir=~/.vim/backup
set directory=~/.vim/backup
if version >= 703
set undofile
set undodir=~/.vim/undo
" Show (partial) command in the status line
set showcmd
" Tagbar Configuration
nmap <Leader>tb :TagbarToggle<CR>
" Auto-focus on open, close on selection
let g:tagbar_autoclose = 1
let g:tagbar_type_javascript = {
\ 'ctagsbin': '/usr/local/bin/jsctags',
\ 'ctagsargs': '-f -'
set background=dark
colorscheme badwolf
" airline settings
let g:airline_powerline_fonts=1
if executable('ag')
let g:ackprg = 'ag --nogroup --nocolor --column'
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
set wildignore+=*/node_modules/*
let g:sneak#streak = 1
let g:javascript_conceal = 1
set conceallevel=2
highlight! link Conceal Structure
"call unite#filters#matcher_default#use(['matcher_fuzzy'])
"call unite#filters#sorter_default#use(['sorter_rank'])
call unite#custom#source('file_rec/async', 'sorters', 'sorter_rank')
nnoremap <silent> <C-p> :Unite -start-insert file_rec/async<cr>
augroup markdown
autocmd FileType markdown call quotable#init()
autocmd FileType markdown call lexical#init()
augroup END
let g:syntastic_javascript_checkers = ['eslint']
let g:tmuxline_preset = {
\'a' : '#S',
\'b' : '#(~/.dotfiles/tmux/scripts/',
\'win' : ['#I', '#W'],
\'cwin' : ['#I', '#W'],
\'y': ['%Y-%m-%d', '%H:%M'],
\'z': ['#h'],
\'options': {'status-justify' : 'left'}}