
If you're like many people, you know Vim as that editor you open to tweak a config file then can't manage to exit. On the other hand, if you frequently use Vim, you know how powerful its modal editing features are. If you run Linux or any other Unix flavor, Vim is worth learning.
That said, Vim shows its age pretty easily. By default, it lacks many of the features we've come to rely on in modern text editors. That said, install a few packages and Vim can hold its own with Visual Studio Code, Sublime Text, and more.
Plugin Management: Vim-Plug
One key feature in modern text editors is the ability to extend them with plugins. While Vim added native package management in version 8.0, many find it cumbersome compared to third-party package managers. One of the most popular package managers is Vim-Plug.
Before you can start using Vim-Plug, you'll need to install it. On a Unix system like Linux or macOS, run the following in a terminal to download and install vim-plug.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
If you're using Vim in Windows, you can install Vim-Plug by pasting the following into PowerShell.
md ~\vimfiles\autoload $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' (New-Object Net.WebClient).DownloadFile( $uri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath( "~\vimfiles\autoload\plug.vim" ) )
Now, you'll be able to install plugins by adding them to your ~/.vimrc
file. You'll need to add two new lines to the file:
call plug#begin('~/.vim/plugged')
call plug
No comments:
Post a Comment