코딩하는 나귀

.vimrc 파일 백업

맥(Mac)2018. 2. 22. 14:35

syntax on

colorscheme torte

filetype plugin on

filetype indent on

set ai

set nu

set hls 

set ts=4

set sw=4

set sts=4

set tags=./tags;

set nocompatible

set encoding=utf8

set gfn=D2Coding:h16


"au BufWritePost *.cs silent call DoTag()

"map <F1> :silent call DoTag()<CR>

map <F1> :call DoTag()<CR>

"F2 - 커서 위치를 새창으로 Tag Jump 하는 단축키

map <F2> <C-w><C-]><C-w>T

"F3 - 커서 위치를 tj로 검색하는 단축키

map <F3> :call SliceTagJump()<CR>

map <F4> <C-w>T


function DoTag()

    let full_path = expand('%:p')

    let index = stridx(full_path,'Assets')


    if index > 0 

        let assets_path = strpart(full_path, 0, index+6)

        execute "!ctags -R -f ".assets_path."/tags"." ".assets_path

    endif

endfunction


function SliceTagJump()

    let word = expand("<cword>")

    exe "stj ".word

endfunction



'맥(Mac)' 카테고리의 다른 글

[Mac] Synergy 자동실행  (1) 2011.03.04