-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_vim_plug
More file actions
34 lines (30 loc) · 1.02 KB
/
Copy pathadd_vim_plug
File metadata and controls
34 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
if [ ! -e ~/.vim/autoload/plug.vim ] ;
then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
else
echo "Already have vim-plug"
fi
if [ ! -e ~/.vimrc ] ;
then
cat >~/.vimrc << "EOM"
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
" You can specify a custom plugin directory by passing it as the argument
" - e.g. `call plug#begin('~/.vim/plugged')`
" - Avoid using standard Vim directory names like 'plugin'
" Make sure you use single quotes
" Initialize plugin system
" - Automatically executes `filetype plugin indent on` and `syntax enable`.
call plug#end()
" You can revert the settings after the call like so:
" filetype indent off " Disable file-type-specific indentation
" syntax off " Disable syntax highlighting
EOM
else
echo "Already have .vimrc"
fi