Communitygithub.com

G1Joshi/Agent-Skills

모달 편집, .vimrc 설정, 레지스터, 매크로, 검색/치환, vim-plug를 통한 플러그인 관리 등 Vim 전문가 수준의 지원을 제공합니다. 터미널 환경에서 효율적인 텍스트 편집, Vimscript 작성, 매크로 기록, 핵심 Vim 설정 구성 시 사용하세요.

Agent-Skills란 무엇인가요?

이 스킬은 Vim 에디터 사용자를 위한 포괄적인 가이드로, 시스템 설정부터 고급 텍스트 변환, 매크로 자동화, 플러그인 관리까지 다룹니다. 모든 Unix/Linux 시스템에 기본 설치된 Vim의 보편성과 호환성을 활용하여, 원격 서버나 로컬 환경에서 별도 설치 없이 즉시 생산성을 높일 수 있습니다. 주요 기능으로는 연산자-모션 문법(`dap`, `ci"`, `gUiw`)을 사용한 정밀 텍스트 조작, `qa`/`@a` 명령을 통한 반복 편집 자동화, `:PlugInstall`로 플러그인을 손쉽게 설치하는 vim-plug 통합을 포함합니다. 스킬은 최소한의 `.vimrc` 설정부터 실용적인 키 매핑, 검색 하이라이트 초기화, 분할 창 탐색 등의 모범 사례를 제시하며, Mac, Windows(WSL), Linux에서 동일하게 작동합니다. Neovim 같은 풍부한 IDE 경험이 필요하지 않은 상황에서 Vim의 안정성과 이식성을 극대화하는 데 적합합니다.

지원 대상~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/G1Joshi/Agent-Skills/tree/HEAD/skills/tools/vim

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Vim

Vim은 모든 UNIX 시스템에 설치된 보편적인 텍스트 편집기입니다. Neovim이 혁신을 추구하는 반면, Vim은 하위 호환성과 안정성에 중점을 둡니다.

사용 시기

  • 범용 서버 및 시스템 편집: 추가 소프트웨어 설치 없이 모든 Unix/Linux 서버에서 시스템 설정, 스크립트, 코드를 편집해야 할 때.
  • 모달 텍스트 조작: 연산자-모션 문법(dap, ci", gUiw)을 사용하여 텍스트 변환을 구성해야 할 때.
  • 헤드리스 매크로 자동화: 수백 줄에 걸친 반복 편집 작업을 기록하고 재생해야 할 때 (qa, @a).
  • Git 커밋 및 병합 편집: 커밋 메시지, 대화형 리베이스, diff 충돌 해결을 위한 빠른 대화형 편집.

빠른 시작

1. 최소 ~/.vimrc

syntax on
set number
set relativenumber
set tabstop=2
set shiftwidth=2
set expandtab
set hlsearch
set incsearch
set clipboard=unnamed

let mapleader = " "
nnoremap <leader>w :w<CR>
nnoremap <leader>q :q<CR>

2. 핵심 편집 명령

  • i / a: 입력 모드 (커서 앞 / 뒤)
  • ci": 따옴표 안 내용 변경
  • da{: 중괄호 주변 삭제
  • :%s/foo/bar/g: 파일 내 모든 foo를 bar로 치환
  • . : 마지막 수정 반복

핵심 개념

최신 프로덕션 Vimrc (~/.vimrc)

적절한 기본값, 플러그인 관리자, 코드 탐색을 구성:

" ~/.vimrc
set nocompatible
filetype plugin indent on
syntax on

" 일반 설정
set number
set relativenumber
set expandtab
set shiftwidth = 2
set tabstop = 2
set autoindent
set smartindent
set hlsearch
set incsearch
set ignorecase
set smartcase
set hidden
set backspace=indent,eol,start
set updatetime=300
set clipboard=unnamed

" 리더 키 매핑
let mapleader = " "

" 빠른 분할 창 탐색
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l

" 검색 하이라이트 지우기
nnoremap <leader>h :nohlsearch<CR>

필수 텍스트 객체 및 문법

연산자(d, c, y, v)를 텍스트 객체 및 동작과 결합:

ci"      - 큰따옴표 안 내용 변경 ("foo" -> "")
di(      - 괄호 안 삭제
yap      - 단락(yank) 복사
gUiw     - 내부 단어를 대문자로 변환
dt,      - 커서부터 쉼표까지 삭제
.        - 마지막 변경 사항 즉시 반복

매크로 기록 및 실행

반복적인 표 데이터 변환 자동화:

1. `qa`를 눌러 레지스터 'a'에 매크로 기록 시작
2. 텍스트 편집 단계 수행 (예: `0iconst <Esc>A = true;<Esc>j`)
3. `q`를 눌러 기록 종료
4. 현재 줄에서 매크로 재생: `@a`
5. 50줄에 걸쳐 매크로 재생: `50@a`
6. 시각 선택 영역에서 매크로 실행: `:'<,'>normal @a`

일반 패턴

매크로 기록 및 대량 실행

문제: 여러 줄에 걸친 반복적인 다단계 편집 수행. 해결책: 레지스터 q에 키 입력을 기록.

  1. 커서를 대상 시작 위치에 배치.
  2. qq를 눌러 레지스터 q에 기록 시작.
  3. 편집 순서 수행 (예: I" <Esc> A",<Esc> j ^).
  4. q를 눌러 기록 중지.
  5. @q로 재생하거나, 50줄에 걸쳐 실행: 50@q.

vim-plug로 플러그인 관리

문제: 수동 경로 조작 없이 Vim 플러그인 설치 및 구성. 해결책: vim-plug 사용.

call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'preservim/nerdtree'
call plug#end()

Vim 내에서 :PlugInstall을 실행하여 설치합니다.

모범 사례 (2026)

  • 할 것: 모달 탐색(h, j, k, l, w, b, e)을 숙달하고 화살표 키 사용을 피하세요.
  • 할 것: 텍스트 객체(ciw, da(, yi{)를 활용하여 최소 키 입력으로 구조화된 코드 블록을 편집하세요.
  • 할 것: 점 명령(.)을 사용하여 유사한 줄에 최근 텍스트 변환을 반복하세요.
  • 할 것: set hidden을 활성화하여 버퍼를 강제 저장 없이 백그라운드에서 열어둘 수 있게 하세요.
  • 하지 말 것: 수백 개의 무거운 레거시 VimScript 플러그인을 설치하지 마세요. 풍부한 IDE 경험이 필요하면 Neovim Lua로 전환하세요.
  • 하지 말 것: 스왑 파일(.swp)을 방치하지 마세요. set noswapfile을 구성하거나 전용 스왑 디렉토리를 설정하세요.
  • 하지 말 것: 원격 머신에서 눈에 띄는 시작 지연을 유발하는 동기 외부 호출을 ~/.vimrc에서 사용하지 마세요.

문제 해결

오류 / 증상원인해결책
시스템 클립보드 복사 실패 ("+y가 작동 안함)Vim이 +clipboard 지원 없이 컴파일됨vim-gtk3(Ubuntu) 또는 macvim / neovim을 클립보드 지원과 함께 설치하세요.
화살표 키가 A, B, C, D 문자를 입력함엄격한 Vi 호환 모드로 실행 중~/.vimrc 상단에 set nocompatible를 추가하세요.
검색 후 후행 공백 강조가 유지됨검색 하이라이트가 활성 상태로 남음:nohlsearch를 누르거나 <leader>h :nohlsearch<CR>를 바인딩하세요.

참고 자료

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

G1Joshi/Agent-Skills

Expert Dask distributed computing assistance covering Dask DataFrames, Arrays, Futures, and cluster scaling. Use when analyzing datasets too large for pandas on a single machine or multi-node cluster.

G1Joshi/Agent-Skills

Expert dbt (data build tool) assistance covering SQL modeling, Jinja macros, tests, documentation, and semantic layer. Use when building analytics engineering pipelines on BigQuery, Snowflake, or PostgreSQL.

G1Joshi/Agent-Skills

Expert JAX assistance covering Autograd, XLA compilation (`jit`), vectorization (`vmap`), and parallelization (`pmap`). Use when building high-performance numerical computing and cutting-edge deep learning research.

G1Joshi/Agent-Skills

Expert Ray distributed computing assistance covering Ray Core (actors, tasks), Ray Train, Ray Tune, and Ray Serve. Use when scaling Python compute and ML training across multi-node clusters.

G1Joshi/Agent-Skills

Expert Git version control assistance covering branching, interactive rebase, cherry-pick, submodules, worktrees, and conflict resolution. Use when managing source code history and collaboration workflows.

G1Joshi/Agent-Skills

Expert K9s CLI assistance covering terminal Kubernetes cluster navigation, real-time log streaming, port forwarding, and pod debugging. Use when managing and troubleshooting Kubernetes clusters with speed.

G1Joshi/Agent-Skills

Expert SWC assistance covering high-performance Rust-based JavaScript/TypeScript compilation, .swcrc configuration, Jest testing via @swc/jest, and minification. Use when replacing Babel with SWC for faster builds, accelerating test execution, or compiling modern ECMAScript features.

G1Joshi/Agent-Skills

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

G1Joshi/Agent-Skills

Expert Zed editor assistance covering high-performance Rust-based text editing, multi-buffer editing, language server protocols (LSP), and AI assistant integrations. Use when configuring Zed settings.json, setting up language extensions, collaborating in real-time channels, or optimizing editor startup speed.

G1Joshi/Agent-Skills

Expert Zsh assistance covering shell customization, Oh My Zsh plugins, Zinit plugin manager, prompt engineering (Starship/Powerlevel10k), and shell scripting. Use when configuring .zshrc, writing Zsh automation scripts, optimizing shell startup time, or configuring tab-completion.

G1Joshi/Agent-Skills

Expert [skill-name] assistance covering [feature 1], [feature 2], and [feature 3]. Use when [working with X], [debugging Y], or [implementing Z].

관련 스킬