Notice»

Recent Post»

Recent Comment»

Recent Trackback»

Archive»

« 2024/5 »
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 31

 
 

Cygwin Vi 설정

자유게시판 | 2009. 11. 17. 14:13 | Posted by 하센세

syntax on  //옵션이 가장중요!!!

--------------------------------------------------
vi ~/.vimrc 이후에

set autoindent
set cindent
set smartindent
set number
set shiftwidth=3
set tabstop=3
set hlsearch
set wrap
set background=light
syntax on
set bs=2

그리고,

/etc/profile 수정
profile 파일을 열고 다음 내용을 추가한다.

if [ -f /etc/bash.bashrc ] ; then
   source /etc/bash.bashrc
fi

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
   INPUTRC=/etc/inputrc
fi

/etc/inputrc 작성 및 수정
기본값으로 inputrc 파일이 존재하지 않는데 /etc 디렉토리에 새로 만들고, 다음 내용을 추가한다.

set meta-flag on
set convert-meta off
set output-meta on
set completion-ignore-case on
set bell-style visible
set horizontal-scroll-mode on
set show-all-if-ambiguous on

 

/etc/bash.bashrc 수정


 

alias ls='ls -F --color=auto --show-control-char'
alias cp='cp -i'
#export PS1='\[\033]0;\w\007\033[32m\]\u@\h \[\033[33m\w\033[0m\]
export PS1='[\u@\h \W]\$ ' 


set tabstop=2  "탭 간격을 2 칸 으로 지정한다
set shiftwidth=2 " >>나 << 사용시 들여쓰기 간격을 지정한다
set expandtab " 탭 문자를 공백문자로 변환한다.
set softtabstop=2 "탭 간격을 공백문자로 변환하면 두 칸 단위로 삭제한다
set visualbell " 사용자 실수 경고시 비프음 대산 화면을 한 번 반짝인다.
set nobackup "백업 파일을 생성하지 않는다
set cindent "C 언어 스타일의 들여쓰기를 사용합니다.
set autoindent "자동 들여쓰기를 사용합니다.
set smartindent "좀 더 지능적인 들여쓰기를 사용합니다.
set enc=euc-kr "인코딩을 한글로 지정합니다.
set incsearch
"키워드 입력시 검색하는 점진 검색을 사용합니다.  (파이어폭스서 사용)

syntax on "구문 강조기능을 사용합니다
filetype on "파일 종류에 따라 구문을 강조합니다.
set background=dark "배경색을 어두운 색으로 설정합니다.
colorscheme evening "VI 색상 테마를 evening  으로 설정합니다
set backspace=eol,start,indent
"줄의 끝, 시작, 들여쓰기서 백스페이스 사용시 이전 줄과 연결
set history=1000 " VI  편집 기록을 1000개 까지 저장합니다.
set hlsearch "검색어 강조 기능을 사용합니다.
set ignorecase "검색, 편집, 치환시 대소문자를 구분하지 않습니다.
set showmatch "() 과 {} 에서 한 괄호만 입력해도 일치하는 괄호를 보여줍니다
 

:

이통사 앱스토어가 겪을 현실적인 한계들

자유게시판 | 2009. 10. 12. 16:28 | Posted by 하센세

'자유게시판' 카테고리의 다른 글

Cygwin Vi 설정  (0) 2009.11.17
연산자 오버로딩 Test - 시간날때 재 점검  (0) 2009.10.06
:

연산자 오버로딩 Test - 시간날때 재 점검

자유게시판 | 2009. 10. 6. 14:19 | Posted by 하센세


#include <iostream>

using namespace std;

class Point
{
private:
 int x,y;
public:
 Point(int _x=0, int _y=0):x(_x),y(_y){}
 void ShowPosition();
 Point operator+(int val);
// friend Point operator+(int val,Point& p);
};

void Point::ShowPosition()
{
 cout<<x<<"\t"<<y<<endl;
}

Point Point::operator+(int val)
{
 Point temp(x+val,y+val);
 return temp;
}


Point operator+(int val,Point& p)
{
 return p + val;
}


int main()
{
 Point p(3,5);
 p.ShowPosition();
 cout<<"-------------------"<<endl;
 Point p1=p+3;
 p.ShowPosition();
 p1.ShowPosition();
 /*cout<<"aa";*/
 cout<<"-------------------"<<endl;
/* cout<<"aa";*/
 Point p2=3+p;
// cout<<"aa";
 p.ShowPosition();
 p1.ShowPosition();
 p2.ShowPosition();
 return 0;
}

'자유게시판' 카테고리의 다른 글

Cygwin Vi 설정  (0) 2009.11.17
이통사 앱스토어가 겪을 현실적인 한계들  (0) 2009.10.12
: