E D R , A S I H C RSS

.vimrc

~cpp
set nocompatible
set title
set autoindent          " ž™œกœ “ค—ฌ“ฐธฐ ํ•œ‹ค.
set bs=2                " allow backspacing over everything in insert mode
set viminfo='20,"50    " read/write a .viminfo file, don't store more
set ruler               " show the cursor position all the time
set number
set background=light
set softtabstop=4
set shiftwidth=4
set tabstop=4
set incsearch
set vb
set exrc                " ํŠ •”” ‰ํ† ฆฌ—„œ .exrc ํŒŒ˜ „ •„  šฉํ•˜ฒŒ ํ•จ
set mouse=n
set fencs=utf8,euc-kr
"set fencs=euc-kr,utf8
syntax on

let TE_WinWidth = 20    " TagExplorer ฐฝํฌธฐ กฐ ˆ

" Function Key
map <F1> K              " man page
map <F2> :w<CR>
"map <F2> :so $VIMRUNTIME/syntax/2html.vim<CR> " make HTML
map <F3> [{v]}zf        " file folding
map <F4> zo             " file unfolding 
map <F5> :Tlist<CR>^Ww:20vs ./<CR>:set nonu<CR>^Ww^Ww
map <F6> :cl<CR>
map <F7> :cn<CR>        " —Ÿฌ(ฒฐ) œ„˜กœ
map <F8> :cp<CR>        " —Ÿฌ(ฒฐ) œ„˜กœ(—ญˆœ)
map <F9> :noh<CR>       " ํ•˜ดดํŠธ  œฐ
map <C-F10> gd          " –ด–ค ํ•จˆ˜ •ˆ—„œ €—ญ€ˆ˜ ถ” 
map <F11> ^]            "  „—ญ€ˆ˜/ตฌกฐฒด/ •˜ƒˆ˜/ํ•จˆ˜ •˜ ถ” 
map <C-F11> :make<CR>   " Œ“œ
map <F12> ^T            " ด „œ„˜กœ ˜Œ•„˜คธฐ
map <C-F12> :make again<CR> " ชจ‘ ƒˆกœ Œ“œ

set hlsearch

set guifont=monospace
"set guifont=miscfixed
"set guifont=gulimche\ 9
colo default
"colo koehler

let $grepfile="*.[ch] *.cpp"
map ,gc :grep <cword> * -R<CR>
vnoremap <c-a> :IncN<CR>

filetype on
filetype indent on
filetype plugin on

au BufWinLeave *.py mkview              " ณด˜ .py ํŒŒ˜ ˜ˆ „ œ„˜— ปค„œ œ„˜‹œํ‚คธฐ
au BufWinEnter *.py silent loadview     " 
au BufWinLeave *.c mkview               " ณด˜ .c ํŒŒ˜ ˜ˆ „ œ„˜— ปค„œ œ„˜‹œํ‚คธฐ
au BufWinEnter *.c silent loadview      " 

au BufNewFile *.cpp call InsertSkeleton()
"0r ~/.vim/skeleton.cpp
au BufNewFile *.h call InsertHeaderSkeleton()

function! InsertSkeleton()
    0r ~/.vim/skeleton.cpp
    call InsertInclude()
endfunction

function! InsertHeaderSkeleton()
    0r ~/.vim/skeleton.h
    call InsertFname()
endfunction

function! InsertInclude()
    let fname = expand("%:t")
    let fname = substitute(fname, "cpp", "h", "g")
    call search("#include")
    exe "normal A " . """ . fname . """
endfunction

function! InsertFname()
    " Convert newname.h to _NEWNAME_H_
    let fname = expand("%:t")
    let cname = "C" . substitute(fname, "\.h", "", "g")
    let fname = toupper(fname)
    let fname = substitute(fname, "\.", "_", "g")
    " Search for #ifndef
    call search("#ifndef")
    exe "normal A " . "___" . fname . "___"
    " Search for #define
    call search("#define")
    exe "normal A " . "___" . fname . "___"
    " Search for #endif
    call search("#endif")
    exe "normal A " . "// ___" . fname . "___"
    " Search for #class
    call search("class")
    exe "normal A" . cname . " {"
    " Search for public
    call search("public:")
    exe "normal A" . "\n" . cname . "() {}\nvirtual ~" . cname . "() {}"
endfunction

"
" vim -b : edit binary using xxd-format!
augroup Binary
  au!
  au BufReadPre  *.bin let &bin=1
  au BufReadPost *.bin if &bin | %!xxd
  au BufReadPost *.bin set ft=xxd | endif
  au BufWritePre *.bin if &bin | %!xxd -r
  au BufWritePre *.bin endif
  au BufWritePost *.bin if &bin | %!xxd
  au BufWritePost *.bin set nomod | endif
augroup END

augroup CvsLogging
 au!
 au BufNewFile,BufRead /tmp/cvs*   set fenc=utf-8 enc=utf-8
augroup END

augroup ChangeLog
 au!
 au BufNewFile,BufRead ChangeLog*   set fenc=utf-8 enc=utf-8
augroup END

source ~/.vim/plugin/word_complete.vim
call DoWordComplete()
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:35
Processing time 0.0094 sec