From a6fa05eddc6ecfd54c9cfeca595b5d4e0b594ce3 Mon Sep 17 00:00:00 2001 From: Michael Skrynski Date: Wed, 12 Jul 2017 11:32:15 +0200 Subject: [PATCH] changed plugin manager to vim-plug --- .gitignore | 1 + README.md | 3 +- vimrc | 90 ++++++++++++++++++++++++++++-------------------------- 3 files changed, 48 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index 62770aa..0c55143 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ tmp* .netrwhist .swp vim/bundle/* +vim/autoload/* diff --git a/README.md b/README.md index 0ee913d..96dfbce 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,4 @@ zlorfi's dotfiles * create symlinks via the `make_my_dotfiles.sh` script * install patched `Source Code Pro` font for the `vim-airline` plugin * change the font of your default terminal app to patched `Source Code Pro` -* clone Vundle repo `git clone git://github.com/gmarik/vundle.git ~/dotfiles/vim/bundle/Vundle.vim` -* launch `vim` with `vim +BundleInstall +qall` +* launch `vim` with `vim +PlugInstall +qall` to install plugins diff --git a/vimrc b/vimrc index 9498af5..30580e9 100644 --- a/vimrc +++ b/vimrc @@ -8,49 +8,48 @@ set history=1000 " filetype plugin indent on filetype off -" set the runtime path to include Vundle and initialize -set rtp+=~/dotfiles/vim/bundle/Vundle.vim -call vundle#begin() +" Load vim-plug if not already installed +if empty(glob("~/.vim/autoload/plug.vim")) + " Ensure all needed directories exist + execute 'mkdir -p ~/.vim/bundle' + execute 'mkdir -p ~/.vim/autoload' + " Download the actual plugin manager + execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim' +endif -" let Vundle manage Vundle, required -Plugin 'gmarik/Vundle.vim' +" Specify a directory for plugins +" - Avoid using standard Vim directory names like 'plugin' +call plug#begin('~/.vim/bundle') -" my plugins -Plugin 'airblade/vim-gitgutter' -Plugin 'ctrlpvim/ctrlp.vim' -" Plugin 'elixir-lang/vim-elixir' -Plugin 'ervandew/supertab' -" Plugin 'garbas/vim-snipmate' -" Plugin 'ingydotnet/yaml-vim' -Plugin 'jiangmiao/auto-pairs' -" Plugin 'kchmck/vim-coffee-script' -" Plugin 'MarcWeber/vim-addon-mw-utils' -" Plugin 'mustache/vim-mustache-handlebars' -" Plugin 'pangloss/vim-javascript' -" Plugin 'Raimondi/delimitMate' -Plugin 'scrooloose/nerdcommenter' -Plugin 'scrooloose/nerdtree' -Plugin 'sheerun/vim-polyglot' -Plugin 'sjl/gundo.vim' -" Plugin 'tomtom/tlib_vim' -" Plugin 'tpope/vim-cucumber' -Plugin 'tpope/vim-endwise' -Plugin 'tpope/vim-fugitive' -" Plugin 'tpope/vim-haml' -" Plugin 'tpope/vim-rails' -Plugin 'tpope/vim-surround' -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' -" Plugin 'vim-ruby/vim-ruby' -" Plugin 'vim-scripts/tComment' -" Plugin 'w0rp/ale' +" Show git status in the gutter +Plug 'airblade/vim-gitgutter' +" Fuzzy file finder +Plug 'ctrlpvim/ctrlp.vim' +" Tab support +Plug 'ervandew/supertab' +" autocomplete brackets +Plug 'jiangmiao/auto-pairs' +" Undo +Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' } +" Comment function +Plug 'scrooloose/nerdcommenter' +" Filebrowser, load on first invocation of 'NERDTreeToggle' +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Language packs +Plug 'sheerun/vim-polyglot' +" Wisley add 'end' in Ruby +Plug 'tpope/vim-endwise' +" Git wrapper +Plug 'tpope/vim-fugitive' +" Statusline +Plug 'vim-airline/vim-airline' +" Statusline themes +Plug 'vim-airline/vim-airline-themes' +" Linter +" Plug 'w0rp/ale' -" All of your Plugins must be added before the following line -call vundle#end() " required -filetype plugin indent on " required - -" Enable syntax highlighting -syntax on +" Initialize plugin system +call plug#end() " Colorscheme if &term == "xterm" @@ -139,9 +138,12 @@ set directory=$HOME/.vim/tmp//,. " Keep swap files in one location set cursorline set laststatus=2 " Show the status line all the time -" Useful status information at bottom of screen -" set statusline=[%n]\ %<%.99f\ %h%w%m%r%y%{fugitive#statusline()}\ %=%-16(\ Line:\ %l\ of\ %L\ %)\ %=%-30(%{strftime(\"\%c\",getftime(expand(\"\%\%\")))}\ %)%P -" set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %=%-16(\ Line:\ %l\ of\ %L\ %)\ %=%-30(%{strftime(\"\%c\",getftime(expand(\"\%\%\")))}\ %)%P + +" persistent undo +if has("persistent_undo") + set undodir=/$HOME/.vim/tmp/ + set undofile +endif " airline if !exists("g:airline_symbols") @@ -203,7 +205,7 @@ map tl :tablast map tm :tabmove map ll :NERDTreeToggle map lo :NERDTree -map _ :GundoToggle +map _ :UndotreeToggle " Marked.app is an Markdown interpreter on MacOS map m :silent !open -a Marked.app '%:p'