2022-03-17 00:51:18 +01:00
|
|
|
|
2022-03-17 19:22:01 +01:00
|
|
|
" Set paths for plug.vim and directory for plugins
|
|
|
|
if has('nvim')
|
|
|
|
let vim_plug_location=$XDG_DATA_HOME."/nvim/autoload/plug.vim"
|
|
|
|
let vim_plug_plugins_dir = $XDG_DATA_HOME."/nvim/plugins"
|
|
|
|
else
|
|
|
|
let vim_plug_location=$HOME.'/.vim/autoload/plug.vim'
|
|
|
|
let vim_plug_plugins_dir = $XDG_DATA_HOME."/vim/plugins"
|
|
|
|
endif
|
2022-03-17 00:51:18 +01:00
|
|
|
|
|
|
|
" If vim-plug not present, install it now
|
|
|
|
if !filereadable(expand(vim_plug_location))
|
|
|
|
echom "Vim Plug not found, downloading to '" . vim_plug_location . "'"
|
|
|
|
execute '!curl -o ' . vim_plug_location . ' --create-dirs' .
|
|
|
|
\ ' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
2022-08-06 21:25:55 +02:00
|
|
|
echom "Next, run :PlugInstall to install all plugins"
|
2022-03-17 00:51:18 +01:00
|
|
|
endif
|
|
|
|
|
2022-03-17 19:22:01 +01:00
|
|
|
" If Plugins directory not yet exist, create it
|
|
|
|
if empty(vim_plug_plugins_dir)
|
|
|
|
call mkdir(vim_plug_plugins_dir, 'p')
|
|
|
|
endif
|
2022-03-17 00:51:18 +01:00
|
|
|
|
2022-03-17 19:22:01 +01:00
|
|
|
" Initialize Vim Plugged
|
|
|
|
call plug#begin(vim_plug_plugins_dir)
|
|
|
|
" Light-weight status line
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
" A tree explorer plugin for vim
|
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
" Highlight, navigate, and operate on sets of matching text
|
|
|
|
Plug 'andymass/vim-matchup'
|
|
|
|
" Displays and browse tags in a file
|
|
|
|
Plug 'preservim/tagbar'
|
|
|
|
" Fuzzy-file finder in vim
|
|
|
|
Plug 'junegunn/fzf'
|
|
|
|
" Smoothe scrolling
|
|
|
|
Plug 'psliwka/vim-smoothie'
|
|
|
|
" File icons for most languages
|
|
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
" Easy comments in most languages
|
|
|
|
Plug 'preservim/nerdcommenter'
|
|
|
|
" Check syntax in real-time
|
|
|
|
Plug 'dense-analysis/ale'
|
|
|
|
" Surround selected text with brackets, quotes, tags etc
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
" Better incremenal searching
|
|
|
|
Plug 'haya14busa/incsearch.vim'
|
|
|
|
" Multi-cursor support
|
|
|
|
Plug 'mg979/vim-visual-multi'
|
|
|
|
" Easily generate number/ letter sequences
|
|
|
|
Plug 'triglav/vim-visual-increment'
|
|
|
|
" Wraper for running tests
|
|
|
|
Plug 'janko/vim-test'
|
|
|
|
call plug#end()
|
|
|
|
|