Skip to content

Instantly share code, notes, and snippets.

@ybur-yug
Last active August 28, 2015 15:17
Show Gist options
  • Save ybur-yug/75d768bd84c9ed203070 to your computer and use it in GitHub Desktop.
Save ybur-yug/75d768bd84c9ed203070 to your computer and use it in GitHub Desktop.
my vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'kien/ctrlp.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
Plugin 'user/L9', {'name': 'newL9'}
Plugin 'rking/ag.vim'
Plugin 'bling/vim-airline'
Plugin 'tpope/vim-fugitive'
Plugin 'kchmck/vim-coffee-script'
Plugin 'elixir-lang/vim-elixir'
Plugin 'heartsentwined/vim-emblem'
Plugin 'tnoda/rcodetools'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"airline stuff
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#tab_min_count = 2
"syntax highlighting
colorscheme industry
syntax on
au BufReadPost *.hbs set syntax=html
set hlsearch
"line numbers
set nu
"tabbing
set tabstop=2
set shiftwidth=2
set expandtab
set autoindent
set smartindent
"backspace key
set backspace=2
":e autocomplete settings
set wildmenu
set wildmode=longest:list,full
"format the statusline
set laststatus=2
"My Custom Mappings
nmap <Right> <C-W>l
nmap <Left> <C-W>h
nmap <Up> <C-W>k
nmap <Down> <C-W>j
nmap ,f :Ag<space>
nmap ,e <C-E>
nmap ,p <C-P>
nmap ,t <C-P>
"file tree
function! ToggleVExplorer()
if exists("t:expl_buf_num")
let expl_win_num = bufwinnr(t:expl_buf_num)
if expl_win_num != -1
let cur_win_nr = winnr()
exec expl_win_num . 'wincmd w'
close
exec cur_win_nr . 'wincmd w'
unlet t:expl_buf_num
else
unlet t:expl_buf_num
endif
else
exec '1wincmd w'
Vexplore
let t:expl_buf_num = bufnr("%")
endif
endfunction
map <silent> <C-E> :call ToggleVExplorer()<CR>
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_liststyle = 3
"gvim options
if has("gui_running")
"remove scrollbars
set guioptions-=l
set guioptions-=L
set guioptions-=r
set guioptions-=b
"set colors and fonts
set guifont=Meslo\ LG\ S\ Regular\ for\ Powerline
set transparency=15
"airline stuff
let g:airline_powerline_fonts = 1
endif
nmap <buffer> <F4> <Plug>(xmpfilter-run)
xmap <buffer> <F4> <Plug>(xmpfilter-run)
imap <buffer> <F4> <Plug>(xmpfilter-run)
nmap <buffer> <F3> <Plug>(xmpfilter-mark)
xmap <buffer> <F3> <Plug>(xmpfilter-mark)
imap <buffer> <F3> <Plug>(xmpfilter-mark)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment