{{tag>[editor vim neovim cli]}}
====== nvim ======
Neovim CLI. Vim 호환 편집 흐름에 Lua 확장성, headless 자동화, 원격 제어 옵션을 더한 편집기.
===== Summary =====
* 파일 편집, diff, batch 실행, headless 자동화, 세션 로드, RPC 서버 연결에 사용한다.
* 이 페이지의 로컬 help 출력은 2026-07-12 기준 ''NVIM v0.8.0''에서 확인했다.
===== Installation =====
2026-08-10 기준 공식 Neovim 설치 문서가 안내하는 패키지 경로이다. 배포판 저장소 패키지는 upstream 최신 버전보다 오래될 수 있다.
==== Debian / Ubuntu ====
sudo apt update
sudo apt install neovim
==== RHEL / Fedora ====
공식 설치 페이지에는 RHEL/Fedora용 사전 빌드 archive와 AppImage가 안내되어 있다. 배포판 package를 사용할 때는 제공 버전을 먼저 확인한다.
==== macOS ====
brew install neovim
==== Windows ====
winget install Neovim.Neovim
==== Verify ====
nvim --version
===== Usage =====
nvim file.txt
nvim -d old.txt new.txt
nvim --headless "+checkhealth" +q
nvim -u NONE -n file.txt
* ''**nvim** FILE...''
* ''**nvim** -d FILE1 FILE2''
* ''**nvim** --headless -c CMD''
* ''**nvim** -u CONFIG''
* ''**nvim** --listen ADDRESS''
* ''**nvim** --server ADDRESS --remote FILE...''
===== Options =====
* ''**-d**'': diff mode로 연다.
* ''**-u** CONFIG'': 지정한 config를 사용한다. ''NONE''으로 시작 설정을 비활성화할 수 있다.
* ''**-n**'': swap file을 만들지 않는다.
* ''**-R**'': read-only mode.
* ''**-S** SESSION'': session 파일을 로드한다.
* ''**-c** CMD'', ''**+CMD**'': 시작 후 Ex 명령을 실행한다.
* ''**--cmd** CMD'': config 로드 전 Ex 명령을 실행한다.
* ''**--headless**'': UI 없이 batch/headless 실행.
* ''**--clean**'': user config, plugin, shada 없이 factory default로 시작한다.
* ''**--listen** ADDRESS'': RPC 서버를 연다.
* ''**--server** ADDRESS'': 원격 제어할 서버를 지정한다.
===== Examples =====
nvim README.md
nvim -d before.txt after.txt
nvim -u NONE -n scratch.txt
nvim --headless "+checkhealth" +q
nvim --headless "+lua print(vim.fn.getcwd())" +q
nvim -c "set number" notes.txt
nvim -S Session.vim
nvim --listen /tmp/nvim.sock
nvim --server /tmp/nvim.sock --remote file.txt
===== Config =====
* 기본 사용자 설정: ''~/.config/nvim/init.lua'' 또는 ''~/.config/nvim/init.vim''
* 시스템 기본 경로 힌트: ''$VIM/sysinit.vim'', ''/usr/share/nvim''
* 상태/공유 데이터: ''shada'' 파일 사용
* plugin manager 예시는 배포/배포판마다 다르므로 이 페이지에서는 일반 CLI 흐름 위주로 다룬다.
===== Troubleshooting =====
* 설정 문제를 분리할 때는 ''nvim --clean'' 또는 ''nvim -u NONE -n''으로 재현한다.
* plugin/LSP 문제는 ''nvim --headless "+checkhealth" +q'' 또는 편집기 안의 '':checkhealth''로 확인한다.
* swap/recovery 확인은 ''nvim -r'' 또는 ''nvim -r FILE''을 사용한다.
* 원격 제어가 동작하지 않으면 ''--listen'' 주소와 소켓 권한, 서버 프로세스 생존 여부를 먼저 본다.
===== Compatibility =====
* 로컬 확인 버전: ''NVIM v0.8.0''
* 최신 Neovim은 Lua config, LSP, remote API 주변 기능이 계속 확장되므로 배포판 패키지 버전 차이를 감안한다.
* 오래된 배포판 패키지는 upstream 최신 문서보다 옵션이나 기본 동작이 적을 수 있다.
===== Deprecated / Legacy =====
* ''init.vim''은 여전히 유효하지만, 새 설정 예제는 ''init.lua'' 중심으로 옮겨가는 추세다.
* Vim 전용 plugin이나 legacy Vimscript 설정은 Neovim에서 그대로 동작하지 않을 수 있다.
===== Related =====
* 최소 재현: ''nvim --clean'', ''nvim -u NONE -n''
* 자동화: ''nvim --headless'', ''nvim -c'', ''nvim --cmd''
* 원격 제어: ''nvim --listen'', ''nvim --server'', ''nvim --remote''
===== Help =====
++++ nvim --help |
Usage:
nvim [options] [file ...] Edit file(s)
nvim [options] -t Edit file where tag is defined
nvim [options] -q [errorfile] Edit file with first error
Options:
-- Only file names after this
+ Start at end of file
--cmd Execute before any config
+, -c Execute after config and first file
-b Binary mode
-d Diff mode
-e, -E Ex mode
-es, -Es Silent (batch) mode
-h, --help Print this help message
-i Use this shada file
-m Modifications (writing files) not allowed
-M Modifications in text not allowed
-n No swap file, use memory only
-o[N] Open N windows (default: one per file)
-O[N] Open N vertical windows (default: one per file)
-p[N] Open N tab pages (default: one per file)
-r, -L List swap files
-r Recover edit state for this file
-R Read-only mode
-S Source after loading the first file
-s Read Normal mode commands from
-u Use this config file
-v, --version Print version information
-V[N][file] Verbose [level][file]
--api-info Write msgpack-encoded API metadata to stdout
--clean "Factory defaults" (skip user config and plugins, shada)
--embed Use stdin/stdout as a msgpack-rpc channel
--headless Don't start a user interface
--listen Serve RPC API from this address
--noplugin Don't load plugins
--remote[-subcommand] Execute commands remotely on a server
--server Specify RPC server to send commands to
--startuptime Write startup timing messages to
See ":help startup-options" for all options.
++++
===== See Also =====
* [[vim:ko|vim]]
* [[vi:ko|vi]]
* [[helix:ko|helix]]
===== History =====
* codex:: 2026-08-10 Migrated nvim to a language head page and added current installation guidance and related editor links.
* codex:: 2026-07-12 Added nvim reference page with headless, diff, config, and remote-control workflow notes.
{{indexmenu>.#1|js}}