8
5

More than 1 year has passed since last update.

概要

MacでNeoVimを動かすための手順メモです。

Neovimをインストールする

Homebrewを使用
brew install neovim

プラグインマネージャを入れる

vim-plugをインストールします。
プラグインマネージャでneovimの便利プラグインをインストールしたり管理することが簡単にできるので、入れておくと便利です。

以下コマンドでインストール可能

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'

設定ファイルの作成

vim-plugをインストールしている場合、以下のような形でプラグインを設定できる。

call plug#begin('~/.config/nvim/plugged')
Plug 'プラグイン名'
call plug#end()

プラグイン等の設定を~/.config/nvim/init.vimに記述する

~/.config/nvim/init.vim
"行番号
set number
"インデントの設定
set softtabstop=4

call plug#begin('~/.config/nvim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

call plug#end()

set xxxxのような設定はvimrcと同じ

好きなプラグインを入れる

色々プラグインがあるので、探して気に入ったものを入れてみよう

Vim Airline
ステータスバーをモダンなデザインにする

Nerd Tree
VSCodeみたいにファイルツリーを左側に表示させることができる

入れるプラグインに迷ったら参考にしたい記事

8
5
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
8
5