Linux
.vimrc
bayron
2010. 9. 10. 12:14
set number
"number at left side
syntax on
"coloring syntax
"color yw
"color scheme : yw
set tabstop=4
set shiftwidth=4
set sts=4
"set textwidth=80
set cindent
set smartindent
set fo+=r
" every line between /* and */ add *
set ruler
"row,column on the bottom
set laststatus=2
"show status bar on the bottom
set showmatch
"whenever close } or ) or ] , show { or ( or [.
set foldmethod=syntax
set foldlevel=32767
" D := Apple, M := alt, C := ctrl, S := shift
imap <F1> <ESC>3K
map <F1> 3K
"man page
imap <F2> <ESC>[i
map <F2> [i
"show prototype
imap <F5> <ESC>:w!<CR>:make<CR>
map <F5> :w!<CR>:make<CR>
"save and make
imap <F6> <ESC><F5>:!./%<<CR>
map <F6> <F5>:!./%<<CR>
"save and make and excute
imap <F7> <ESC>gd
map <F7> gd
"go definition
map <F12> za
"unfolding
au BufRead,BufNewFile *.c
\ if !filereadable("Makefile") && !filereadable("makefile") |
\ set makeprg=gcc\ $CFLAGS\ %\ -o\ %< |
\ endif
au BufRead,BufNewFile *.cpp
\ if !filereadable("Makefile") && !filereadable("makefile") |
\ set makeprg=g++\ $CFLAGS\ %\ -o\ %< |
\ endif
au BufRead,BufNewFile *.py
\ if !filereadable("Makefile") && !filereadable("makefile") |
\ set makeprg=python\ %\ |
\ endif
nnoremap <silent> <F3> :cp<CR>
nnoremap <silent> <F4> :cn<CR>