기본 콘텐츠로 건너뛰기

리눅스 vi 셋팅

vi ~/.bashrc  해서 들어가서

alias vi='vim' 를 추가하고 저장하여

source ~/.bashrc 명령어 실행



그리고 홈디렉토리에서 .vimrc파일을 만들면된다.

명령행에는 ~ 인곳.. 또는 그냥 cd 라고 치면 나오는 디렉토리가

홈디렉토리이다.

#.vimrc 내용
set number " 라인번호를 붙임
set tabstop=4 " 탭문자는 4컬럼 크기로 보여주기
set shiftwidth=4 " 문단이나 라인을 쉬프트할 때 4컬럼씩 하기
set autoindent " 자동 들여쓰기
syntax on " 적절히 Syntax에 따라 하일라이팅 해주기
set background=dark " 이건 터미널 모드에선 영향이 없다.
set cindent " C 언어 자동 들여쓰기
set showmatch       " 매치되는 괄호의 반대쪽을 보여줌
set title           " 타이틀바에 현재 편집중인 파일을 표시
set textwidth=79 " 만약 79번째 글자를 넘어가면 다음행으로

set smartindent " 좀더 똑똑한 들여쓰기를 위한 옵션이다.

set autoindent " 자동으로 들여쓰기를 한다.

댓글

이 블로그의 인기 게시물

java 특정 디렉토리에 있는 파일 목록을 읽어내기, 정렬해서 가져오기

폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) {   if(tempFile.isFile()) {     String tempPath=tempFile.getParent();     String tempFileName=tempFile.getName();     System.out.println("Path="+tempPath);     System.out.println("FileName="+tempFileName);     /*** Do something withd tempPath and temp FileName ^^; ***/   } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...

dmesg 메시지 실시간으로 보기

참조사이트 http://imitator.kr/Linux/556 # tail -f /var/log/messages # tail -f |dmesg //기본 2초 단위로 갱신 된다. # watch "dmesg | tail -f" //1초 단위로 갱신하면서 보여준다. # watch -n 1 "dmesg | tail -f" // 보여주는 줄을 20으로 늘린다. (기본 10줄) # watch -n 1 "dmesg | tail -f -n 20"