'vi filename'에 해당되는 글 1건

  1. 2010.01.29 vi 상태표시줄 설정 / 편집중인 파일이름 보기
프로그램 사용/vi2010. 1. 29. 11:02
vi가 아쉬운 점은, 현재 편집중인 파일의 이름을 알수 없다는 점이다. (기본값으로)
아무튼 검색을 해보니 일시적으로 확인하려면
Ctrl-g나 :f로 하면 되지만 커서를 움직이면 사라진다.

이를 고정적으로 출력하기 위해서는 laststaus=2로 설정하면 된다.
다중창으로 편집중에는 출력되지만, 단일 창에서는 출력되지 않는다.

참고로 몇행:몇열 전체 % 라고 나오는 건 ruler 이다.
:set ruler
:set noruler로 토글가능하다.

Ctrl - G
:f
로 현재 편집중인 파일을 출력함

[링크 : http://kldp.org/node/92434]

:set laststatus=2

[링크 : http://vim.wikia.com/wiki/Displaying_status_line_always]

'laststatus' 'ls'    number    (default 1)
            global
            {not in Vi}
    The value of this option influences when the last window will have a
    status line:
        0: never
        1: only if there are at least two windows
        2: always
    The screen looks nicer with a status line if you have several
    windows, but it takes another screen line. |status-line|

[링크 : http://vimdoc.sourceforge.net/htmldoc/options.html#%27laststatus%27]

Posted by 구차니