Linux2010. 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>

'Linux' 카테고리의 다른 글

POSIX  (0) 2011.06.21
우분투에서 MAC address 변경  (0) 2010.12.28
M-player - Vaapi  (0) 2010.01.27
VA-API 설치 Vaapi  (0) 2010.01.27
Nvidia 195.xx driver 설치 - Ubuntu (엔비디아 그래픽 드라이버 우분투 리눅스 설치)  (0) 2010.01.27


Posted by bayron