#0. git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

#1. vimrc를 카피한다


vimrc.txt


#2. vim +BundleInstall +qa

(서버가 느린지 시간이 꽤 오래 걸린다)


#3. 적당히 원하는 부분 수정해서 사용하도록 한다

(예를 들면 cscope를 autoload로 바꾸든지 등)

http://vim.wikia.com/wiki/Autoloading_Cscope_Database


#4. cscope 생성 할 때 find . ~~ 으로 하면 안되고

find `pwd` ~~ 로 생성해야 한다

SrcExpl에서 acd 를 사용하는데 그게 cscope와 호환이 잘 되지 않는다

그래서 절대 경로로 cscope 파일을 생성해야 함


기타 - NERDtree가 정상적으로 동작하지 않는 경우가 있다

이럴 때는 NERDtree를 껐다가 켜거나(caching error)

엔터키 대신 o키를 사용하여 파일을 열면 된다(원래는 enter를 쳐도 파일이 열려야 정상)


마우스가 은근 불편한데 toggle로 mouse mode를 켜고 끄도록 하면 편리할듯 싶다


vim 컴파일 할 때 ./configure --prefix /usr --enable-cscope 옵션을 줘야 한다

기존 fedora package 7.3은 /usr/bin에 설치되지만 7.4는 /usr/local/bin이 기본


Bundle로 Solarized 색상표가 오동작 하는 경우가 있다

그냥 이럴 때는 패키지를 삭제하고 직접 색상코드를 vim74/color 디렉토리에 넣고 사용하는게 낫다


vim 쓰다 먹통되면 십중 팔구는 ctrl + q 누르면 풀린다 


환경 설정 중 복잡한 부분 설명

F1 - 함수 폴딩(함수 function{} 에서 {에 대고 F1 누르면 접힌다)

F2 - 접은거 풀기

F3 - 뭐더라 까먹었다 ㅠㅠ

F5 - 선언한 원형으로 이동하기, 가장 많이 쓰일듯 싶다


문서 수정 해야 함 


~/.vimrc


set cindent

set smartindent

set autoindent

set mouse=a

 

set ts=4

set nu

set sw=4

set paste

"set expandtab

"au Bufenter * set et

 

set tags+=/usr/src/kernels/linux-2.6.37/tags

set csprg=/usr/bin/cscope

set csto=0

set cst 

set nocsverb

if filereadable("./cscope.out")

    cs add cscope.out

    cs add /usr/src/kernels/linux-3.12.10/cscope.out

else

    cs add /usr/src/kernels/linux-3.12.10/cscope.out

endif

set csverb

 

set wrap

set nobackup

set visualbell

set hlsearch

hi Comment ctermfg=6 ctermbg=none cterm=none

 

syntax enable 

set bg=dark


"colorscheme torte

"colorscheme ron

"colorscheme zellner

colorscheme peachpuff

"colorscheme solarized

set ruler

 

set bs=2 fo=cqrt ls=2 shm=at ww=<,>,h,l ts=4 sw=4

 

map <F1> v]}zf

map <F2> zo

map <F3> [i

map <F5> gd

map <F6> :tnext^M

map <F7> :tprevious^M

nmap <F8> :SrcExplToggle<CR>

nmap <F11> :TrinityToggleAll<CR>

nmap <F12> :TlistToggle<CR>


"nmap <F9> :NERDTreeToggle<CR>

"let NERDTreeWinPos = "right"

let NERDTreeIgnore = ['\.o$', '\.ko$', 'cscope.*', '\.a$', '\.symvers$']


map <C-n> :NERDTreeToggle<CR>

nmap <C-H> <C-W>h

nmap <C-L> <C-W>l

"nmap <C-J> <C-W>j

"nmap <C-K> <C-W>k


"cscope key map

nmap <c-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>

nmap <c-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>

nmap <c-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>

nmap <c-\>f :cs find f <C-R>=expand("<cword>")<CR><CR>


let Tlist_Ctags_Cmnd = "/usr/bin/ctags"

let Tlist_Inc_Winwidth = 0

let Tlist_Exit_OnlyWindow = 0

let Tlist_Auto_Open = 0

let Tlist_Use_Left_Window = 1



"// Map the keys below to jump from one window to another:

let g:SrcExpl_winHeight = 8

let g:SrcExpl_refreshTime = 100

let g:SrcExpl_isUpdateTags = 0

" // Set “Enter” key to jump into the exact definition context

let g:SrcExpl_jumpKey = "<ENTER>"

" // Set “Space” key for back from the definition context

let g:SrcExpl_gobackKey = "<SPACE>"


set nocompatible

filetype off                   " required!


set rtp+=~/.vim/bundle/vundle/

call vundle#rc()


Bundle 'gmarik/vundle'

Plugin 'The-NERD-tree'

Plugin 'taglist.vim'

Plugin 'c-standard-functions-highlight'

Plugin 'Trinity'

Plugin 'SrcExpl'

Bundle 'git://git.wincent.com/command-t.git'


filetype plugin indent on     " required!



그리고 tab space로 재정렬 :retab

Posted by 쵸코케키

블로그 이미지
chocokeki
쵸코케키

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함