본문 바로가기
Etc2026년 5월 5일7분 읽기

Tmux + Neovim + Claude Code — 2026년 터미널 워크플로 완성형

YS
김영삼
조회 425
Tmux + Neovim + Claude Code — 2026년 터미널 워크플로 완성형

핵심 요약

2026년 풀 터미널 개발 환경의 표준 조합 — Tmux + Neovim + Claude Code. VS Code·Cursor 못지않은 생산성을, 무거운 GUI 없이 SSH·Codespaces·로컬 어디서든.

1. 전체 구조

+-- tmux session: project-foo --+
|                                |
|  pane 1: nvim (코드 편집)      |
|  pane 2: claude (CLI 코파일럿) |
|  pane 3: lazygit              |
|  pane 4: 테스트/서버           |
|                                |
+--------------------------------+

2. 설치 — 최소 셋업

# 1. Tmux 3.5+ 권장
brew install tmux  # 또는 apt/dnf

# 2. Neovim 0.11+ (LSP 강화 버전)
brew install neovim

# 3. Claude Code
npm install -g @anthropic-ai/claude-code
claude  # 첫 실행 시 OAuth

# 4. lazygit (선택)
brew install lazygit

3. Tmux 키바인딩 — 핵심만

# ~/.tmux.conf
set -g prefix C-a              # Ctrl-A로 prefix
unbind C-b
bind C-a send-prefix

set -g mouse on
set -g base-index 1
set -g escape-time 0           # vim 모드 전환 빠르게
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"

# 분할
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"

# 패널 이동 (vim 키)
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# 세션 빠른 전환
bind C-n switch-client -n
bind C-p switch-client -p

# 플러그인 (TPM)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'

4. Neovim — Claude 연동 플러그인

-- ~/.config/nvim/lua/plugins/claude.lua
return {
  {
    'greggh/claude-code.nvim',
    dependencies = { 'nvim-lua/plenary.nvim' },
    config = function()
      require('claude-code').setup({
        window = {
          split_ratio = 0.4,
          position = 'right',
        },
        keymaps = {
          toggle = { normal = '<leader>cc' },
          send_buffer = '<leader>cb',
          send_visual = '<leader>cv',
        },
      })
    end,
  },
}

키바인딩 한 번에 nvim 안에서 Claude 호출. 비주얼 선택 후 <leader>cv면 선택 영역만 Claude에 전송.

5. Claude Code — 설정 한 번

// ~/.claude/settings.json
{
  "model": "claude-opus-4-7",
  "theme": "dark",
  "permissions": {
    "allow": [
      "Bash(npm test*)",
      "Bash(git status*)",
      "Bash(git diff*)",
      "Read(*)"
    ]
  },
  "statusLine": {
    "type": "command",
    "command": "/opt/homebrew/bin/starship prompt --terminal-width 80"
  }
}

6. 프로젝트별 컨텍스트 — CLAUDE.md

# 프로젝트 루트에 CLAUDE.md
## 이 프로젝트
- TypeScript + Bun 2.0
- 테스트: bun test
- 린트: biome check . --apply
- DB: PostgreSQL 18, Prisma

## 코딩 컨벤션
- 함수형 우선, 클래스는 React 외 거의 안 씀
- Tailwind, 인라인 스타일 금지
- 비동기는 async/await만, .then 금지

## 자주 쓰는 명령
- 개발 서버: bun run dev
- 마이그레이션: bun run db:migrate
- 시드: bun run db:seed

7. 워크플로 — 새 기능 개발

  1. tmux new -s feature-x — 세션 시작
  2. Pane 분할: C-a |nvim
  3. 다른 pane에서 claude 시작 → "다음 기능을 추가해줘"
  4. Neovim에서 변경 확인 → :G commit (fugitive)
  5. 테스트 pane에서 bun test --watch
  6. 완료 후 tmux detach → SSH 끊어도 보존

8. SSH·원격에서

Claude Code·Tmux 둘 다 SSH 친화적. 원격 서버에 한 번 셋업해두면 어디서 접속해도 동일 환경. tmux-resurrect로 재부팅 후에도 세션 복원.

9. 단축키 치트시트

동작
C-a |좌우 분할
C-a -상하 분할
C-a hjkl패널 이동
C-a z현재 패널 풀스크린 토글
C-a ddetach
C-a s세션 목록
<leader>ccnvim 안에서 Claude 토글
<leader>cv비주얼 선택 영역 Claude로

10. 같이 쓰면 좋은 도구

  • fzf — 파일·프로세스·히스토리 fuzzy 검색
  • ripgrep — 코드 검색 grep 대체
  • bat — cat 대체, 신택스 하이라이트
  • zoxide — cd 대체, 빈도 기반 점프
  • starship — 프롬프트
  • delta — git diff 뷰어

11. 단점

  • 학습 곡선 — 첫 1주는 VS Code 그리워짐
  • 이미지·디자인 작업은 GUI가 낫다 — 보완용으로 Browser 동시 사용
  • 한글 IME — Tmux escape-time 0에서 일부 IME 잘림 → IME 자체 설정 조정

참고

  • github.com/tmux-plugins/tpm
  • github.com/greggh/claude-code.nvim

댓글 0

아직 댓글이 없습니다.
Ctrl+Enter로 등록