Skip to content

Instantly share code, notes, and snippets.

@Pryz
Created November 12, 2014 02:40
Show Gist options
  • Save Pryz/f6adc4fba1c3789ae92a to your computer and use it in GitHub Desktop.
Save Pryz/f6adc4fba1c3789ae92a to your computer and use it in GitHub Desktop.
dot vimrc
set nocompatible " be iMproved, required
filetype off " required
" Snippets variables
let g:snips_author='Julien Fabre'
let g:author='Julien Fabre'
let g:snips_email='[email protected]'
let g:email='[email protected]'
let g:snips_github='https://github.com/Pryz'
let g:github='https://github.com/Pryz'
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
" to install plugin run : vim +PluginInstall +qall
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
Plugin 'wincent/command-t'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'bling/vim-airline'
Plugin 'tpope/vim-endwise'
Plugin 'elzr/vim-json'
Plugin 'scrooloose/nerdtree'
Plugin 'rodjek/vim-puppet'
Plugin 'airblade/vim-rooter'
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/syntastic'
Plugin 'godlygeek/tabular'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'tpope/vim-markdown'
Plugin 'flazz/vim-colorschemes'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
syntax on
" Activate Syntastic only for Puppet (mostly)
let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': ['ruby', 'php', 'puppet', 'yaml', 'erb'], }
let g:syntastic_puppet_lint_arguments='--no-class_inherits_from_params_class-check --no-80chars-check'
"" Ultisnip
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" no backup files
set backupcopy=no
set nobackup
set noswapfile
" indentation
set tabstop=2
set softtabstop=2
set shiftwidth=2
set smarttab
set smartindent
set expandtab
set et
set textwidth=80
" highlight search
set hlsearch
" Powerline
let g:airline#extensions#tabline#enabled = 1
" airline status line
"let g:airline_theme='light'
if has('gui_running')
let g:airline_powerline_fonts=1
endif
set laststatus=2
set ttimeoutlen=50
"" " Ruby
"autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
"autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
"autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
"autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
"
"" " Python
"autocmd FileType python set omnifunc=pythoncomplete#Complete
"autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
"autocmd InsertLeave * if pumvisible() == 0|pclose|endif
"
" Puppet
autocmd BufNewFile,BufRead *.pp setl ft=puppet
let g:syntastic_mode_map={ 'mode': 'active',
\ 'active_filetypes': [],
\ 'passive_filetypes': ['puppet'] }
" Shortcuts
" NERDTree
let g:NERDTreeMinimalUI = 1
let g:NERDTreeWinSize = 20
function! ToggleTree()
execute 'NERDTreeToggle'
"execute 'vertical resize 20'
endfunction
map <silent> <F9> <Esc>:call ToggleTree()<CR>
"" toggle line numbers
map <silent> <Leader>n :setlocal number!<CR>
map <silent> <F8> :bn<CR>
"" Play with buffers
nnoremap <Leader>p :bp<CR>
nnoremap <Leader>n :bn<CR>
nnoremap <Leader>1 :1b<CR>
nnoremap <Leader>q :bw<CR>
set hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment