2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【小ネタ】Vimプラグインを管理する方法(Windows編)

Posted at

記事を読んでいただきありがとうございます。
モブエンジニア(@mob-engineer)です。

本日参加したVimConf 2025 Smallに参加したので、
簡単なアウトプットとしてVimプラグインを管理するパッケージインストール方法を残しておきます。

インストール手順

Vim-pluginのGitHubにインストール手順がまとめられています。
基本的にそちらの手順をもとに作業すればvim-pluginを管理するマネージャーを利用できると思います。

今回はWindows環境でインストールします

〇powershellで以下コマンドを実行しましょう

iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
    ni $HOME/vimfiles/autoload/plug.vim -Force

〇こんな感じでインストール完了画面が表示されます

PS <ディレクトリ>> iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
>>     ni $HOME/vimfiles/autoload/plug.vim -Force


    ディレクトリ: <ディレクトリ>\vimfiles\autoload


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        2025/11/02     11:13          84862 plug.vim


PS <ディレクトリ>>

〇NeoVimをインストールする場合はPowershellで以下コマンドを実行しましょう。

iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
    ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force

〇以下の通りインストールが完了します。

PS <ディレクトリ>> iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
>>     ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force


    ディレクトリ: <ディレクトリ>AppData\Local\nvim-data\site\autoload


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        2025/11/02     11:15          84862 plug.vim


PS <ディレクトリ>>

〇同じ階層に.vimrcファイルを作成して以下内容を入力します

# .vimrc

call plug#begin()

" List your plugins here
Plug 'tpope/vim-sensible'

call plug#end()

〇vimコマンドを立ち上げ、:PlugInstallを実行しましょう(Pは大文字なので注意)

image.png

所感

サクッと設定自体は行えるので、MCPサーバを設定している方であればそこまで労せずに設定できると思います。とは言え、業務で利用するのであればプラグイン管理のルールを決めておく必要がある印象を持ちました。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?