Skip to content

Instantly share code, notes, and snippets.

@Esya
Created May 23, 2017 15:33
Show Gist options
  • Save Esya/eda497805bddd10d383cdcccaec2d060 to your computer and use it in GitHub Desktop.
Save Esya/eda497805bddd10d383cdcccaec2d060 to your computer and use it in GitHub Desktop.
vimrc
set nocompatible " be iMproved, required
filetype off " required
" Plugins
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Let Vundle manage Vundle
Bundle 'gmarik/vundle'
" Custom Bundles
Bundle 'scrooloose/syntastic'
Bundle 'scrooloose/nerdtree'
Bundle 'kien/ctrlp.vim'
Bundle 'mattn/emmet-vim'
Bundle 'avakhov/vim-yaml'
"Bundle 'rodjek/vim-puppet'
"Bundle 'eiginn/netrw'
Bundle 'tpope/vim-fugitive'
Bundle 'altercation/vim-colors-solarized'
Bundle 'scrooloose/nerdcommenter'
Bundle 'pangloss/vim-javascript'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'vim-scripts/restore_view.vim'
" Bundle 'majutsushi/tagbar'
"Bundle 'vim-php/tagbar-phpctags.vim'
"Bundle 'StanAngeloff/php.vim'
Bundle 'vim-scripts/ZoomWin'
Bundle 'ekalinin/Dockerfile.vim'
Bundle 'airblade/vim-gitgutter'
Bundle 'dhruvasagar/vim-table-mode'
Bundle 'tacahiroy/ctrlp-funky'
Bundle 'Shougo/neomru.vim'
Bundle 'Shougo/unite-outline'
Bundle 'farseer90718/vim-taskwarrior'
" Autocomplete
Bundle 'Valloric/YouCompleteMe'
" Unite
Bundle 'Shougo/unite.vim'
call vundle#end() " required
filetype plugin indent on " required
" Powerline
"/Users/esya/Library/Python/2.7/lib/python/site-packages/powerline
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
set laststatus=2
set encoding=utf-8
" Theming
syn on
set background=dark
colorscheme solarized
" NERDTree autostartup
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
map ; :NERDTreeToggle<CR>
set autochdir
let NERDTreeChDirMode=2
let NERDTreeShowHidden=1
let NERDTreeMouseMode=3
" Toggle ln
:nmap \l :setlocal number!<CR>
" Search options
:set incsearch
:set ignorecase
:set smartcase
:set hlsearch
:nmap \q :nohlsearch<CR>
" Tagbar
nmap S :TagbarToggle<CR>
let g:tagbar_phpctags_bin='/opt/phpctags/phpctags'
let g:tagbar_type_puppet = {
\ 'ctagstype': 'puppet',
\ 'kinds': [
\'c:class',
\'s:site',
\'n:node',
\'d:definition'
\]
\}
" Code Folding
set foldmethod=syntax
set foldlevelstart=20
" Navigation
:nmap <C-e> :e#<CR>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nmap s <Plug>(easymotion-s)
let g:EasyMotion_smartcase = 1
" Splitting config
set splitbelow
set splitright
" LineNumbering
set number
" Tabulation
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
" Restore view at the last point
set viewoptions=cursor,folds,slash,unix
" GUI Specific
set guifont=Inconsolata\ For\ Powerline:h12
set guioptions-=r
set guioptions-=l
set guioptions-=R
set guioptions-=L
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
" Go to tab by number
noremap <leader>1 1gt
noremap <leader>2 2gt
noremap <leader>3 3gt
noremap <leader>4 4gt
noremap <leader>5 5gt
noremap <leader>6 6gt
noremap <leader>7 7gt
noremap <leader>8 8gt
noremap <leader>9 9gt
noremap <leader>0 :tablast<cr>
" Table Vim
let g:table_mode_corner="|"
nnoremap <leader>jd :YcmCompleter GoTo<CR>
" CtrlP funky
nnoremap <Leader>fu :CtrlPFunky<Cr>
nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr>
let g:ctrlp_funky_matchtype = 'path'
" ClipBoard
set clipboard=unnamed
vnoremap <silent> <leader>y :<CR>:let @a=@" \| execute "normal! vgvy" \| let res=system("pbcopy", @") \| let @"=@a<CR>
" Tasks
let g:task_rc_override = 'rc.defaultwidth=999'
" Crontab
if $VIM_CRONTAB == "true"
set nobackup
set nowritebackup
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment