Updates: November 6, 2024
Contents: Steps to install vim-plug on Linux including Ubuntu
Set Up Environment for NVim Installation
Before installing plugins, ensure that NVim or Vim is installed on your system.
- Install NVim: NVim Installation Guide
- Install Vim: Vim Installation Guide
Install vim-plug
vim-plug is a minimalist Vim plugin manager that supports parallel installation of plugins.
- For NVim:
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
- For Vim:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Configure Plugins
After installing vim-plug, configure your plugins by editing the appropriate configuration file.
- For NVim:
nvim ~/.config/nvim/init.vim
- For Vim:
vim ~/.vimrc
In the configuration file, add the following lines to initialize vim-plug and specify your desired plugins:
" in init.nvim or .vimrc
call plug#begin('~/.vim/plugged')
" List your plugins here
Plug 'tpope/vim-sensible'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
call plug#end()
Install Plugins
After saving the configuration file, install the specified plugins:
- Open NVim or Vim.
- Run the command:
:PlugInstall
This command will download and install all the plugins listed in your configuration file.
Managing Plugins with vim-plug
After installing vim-plug, you can manage your plugins using the following commands:
- :PlugInstall to install the plugins
- :PlugUpdate to install or update the plugins
- :PlugDiff to review the changes from the last update
- :PlugClean to remove plugins no longer in the list
In WSL or WSL2 on Windows, the plugged folder is located at ~/.local/share/nvim/plugged
References
'Setting > Terminal (Shell)' 카테고리의 다른 글
[NVim] How to Install Node.js on Linux (Ubuntu) (0) | 2024.11.06 |
---|---|
[NVim] How to Install GitHub Copilot in NVim (Linux, Ubuntu) (4) | 2024.11.06 |
[NVim] NVim 최신 버전 설치 방법 (Ubuntu) (4) | 2024.11.06 |
[Vim] How to Install the Latest Version (Ubuntu) (4) | 2024.11.05 |
[Vim] 최신 버전 설치 방법 (Ubuntu, Kor) (0) | 2024.11.05 |