Skip to content

Instantly share code, notes, and snippets.

@damien-biasotto
Created September 21, 2015 20:30
Show Gist options
  • Save damien-biasotto/15c77e2e61f188e99b09 to your computer and use it in GitHub Desktop.
Save damien-biasotto/15c77e2e61f188e99b09 to your computer and use it in GitHub Desktop.
My very messy vimrc
" compatible has to be the first of all ( use the real vimpower )
set nocompatible
" backup rules
set backup " enable backup files (.txt~)
set undofile " enable persistent undo
silent execute '!mkdir -p $HOME/.vim/tmp/backup'
set backupdir=$HOME/.vim/tmp/backup " where to store backup
silent execute '!mkdir -p $HOME/.vim/tmp/swap'
set directory=$HOME/.vim/tmp/swap " where to store swap
silent execute '!mkdir -p $HOME/.vim/tmp/views'
set viewdir=$HOME/.vim/tmp/views " where to store view
silent execute '!mkdir -p $HOME/.vim/tmp/undo'
set undodir=$HOME/.vim/tmp/undo " where to store undo
" syntax
syntax on " enable syntax highlighting
" filetype
filetype on " enable filetype detection
filetype plugin on " enable filetype plugins
filetype indent on " enable filetype indentation
" tabstop settings
set tabstop=4 " a tab found in a file will be represented with 4 columns
set softtabstop=4 " when in insert mode <tab> is pressed move 4 columns
set shiftwidth=4 " indentation is 4 columns
set noexpandtab " tabs are tabs, do not replace with spaces
" line numbers
set number
" colorscheme
set background=light
colorscheme solarized
let mapleader=','
nnoremap <space>/ :Unite grep:.<cr>
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:unite_source_grep_command = 'ack'
" plugins
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'spf13/PIV'
Plug 'arnaud-lb/vim-php-namespace'
Plug 'StanAngeloff/php.vim'
Plug 'scrooloose/syntastic'
Plug 'mattn/emmet-vim'
Plug 'Shougo/Unite.vim'
Plug 'Shougo/unite-outline'
Plug 'Shougo/unite-sudo'
Plug 'bling/vim-airline'
Plug 'Shougo/neomru.vim'
Plug 'basyura/unite-rails'
Plug 'tpope/vim-haml'
Plug 'mxw/vim-jsx'
Plug 'joonty/vdebug'
Plug 'pangloss/vim-javascript'
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
Plug 'airblade/vim-gitgutter'
Plug 'othree/html5.vim'
Plug 'davidhalter/jedi-vim'
Plug 'jelera/vim-javascript-syntax'
Plug 'hail2u/vim-css3-syntax'
Plug 'cakebaker/scss-syntax.vim'
Plug 'editorconfig/editorconfig-vim'
Plug 'Townk/vim-autoclose'
Plug 'tobyS/pdv'
Plug 'shawncplus/phpcomplete.vim'
Plug 'vim-php/phpctags'
Plug 'rizzatti/dash.vim'
Plug 'moll/vim-node'
Plug 'Shougo/vimfiler.vim'
Plug 'tpope/vim-surround'
Plug 'Slava/tern-meteor'
Plug 'joonty/vim-phpunitqf'
Plug 'kmnk/vim-unite-giti'
Plug 'hallettj/jslint.vim'
Plug 'walm/jshint.vim'
Plug 'Shougo/vimshell.vim'
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
call plug#end()
call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])
call unite#custom#profile('default', 'context', {
\ 'start_insert': 1
\ })
" replacing unite with ctrl-p
let g:unite_data_directory='~/.vim/.cache/unite'
let g:unite_enable_start_insert=1
let g:unite_source_history_yank_enable=1
let g:unite_prompt='» '
let g:unite_split_rule = 'botright'
if executable('ack')
let g:unite_source_grep_command='ack'
let g:unite_source_grep_default_opts='--nocolor --nogroup -S -C4'
let g:unite_source_grep_recursive_opt=''
endif
nnoremap <silent> <c-p> :Unite -auto-resize file file_mru file_rec<cr>
nmap <silent> <c-d>d <Plug>DashSearch
nnoremap <silent> <c-o> :Unite -auto-resize outline<cr>
nnoremap <silent> <c-k><c-b> :VimFilerExplorer<cr>
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_php_checkers = ['php']
let g:jsx_ext_required = 0
let g:vimfiler_ignore_pattern = ''
@damien-biasotto
Copy link
Author

Sorry for the mess : Vim + Unite and oriented php / js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment