vim

.vimrc

set nu
set title
set hlsearch
set tabstop=4
set nocompatible               " be iMproved

syntax on
filetype off                   " required!

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" My Bundles here:
Bundle 'taglist.vim'
Bundle 'The-NERD-tree'
Bundle 'Tango2'
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
 " ...

filetype plugin indent on     " required!
"
" Brief help
" :BundleList          - list configured bundles
" :BundleInstall(!)    - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
"

nnoremap <silent> <F2> :NERDTreeToggle<CR>
nnoremap <silent> <F5> :Tlist<CR>
nnoremap <silent> <F6> :TlistUpdate<CR>
nnoremap <silent> <F7> :TlistSync<CR>

colorscheme Tango2

ctags

간단한 ctags 명령어 목록

:ta [name] :: name과 일치하는 태그 위치로 이동
ctrl + ]       :: 커서가 위치하고 있는 함수나 구조체의 정의로 이동
ctrl + t        :: 이전 위치로 돌아오기
:ts [name] :: name과 일치하는 태그 목록 출력
:ta /[name]:: name과 일치하는 태그 목록 출력
:tj [name]  :: 목록이 한개인 경우 이동, 여러개인 경우 목록 출력
:tn             :: 다음 태그로 이동 (tag next)
:tp             :: 이전 태그로 이동 (tag previous)
:tags         :: 이동한 태그 히스토리 목록 출력 

scripts

/etc/vim (혹은 $HOME/.vim 나 VIMRUNTIME) 에 풀어주면 설치완료.

    • 현재 열려있는 파일 리스트를 볼 수 있음
    • 사용법 → :BufExplorer
    • 사용법 → :NERDTree (윈도우 :NERDTree c:/)

referece

tip/vim.txt · 마지막 수정: 2011/12/20 12:18 작성자 plasticbox
 
이 위키의 내용은 다음의 라이센스에 따릅니다 : CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki