본문 바로가기

CentOS/Study

[Linux]VI 편집기 - 환경파일 설정

반응형

vi 편집기의 동작하는 기능을 변경하기 위해서는 set 명령어를 사용한다.

set 명령어 다음에 all을 사용하면 현재 편집기에 사용가능한 모든 기능변수들에 대한 현재 설정값을 표시한다.

vi 편집기의 기능을 현재 실행되는 편집 화면에서만 변경하기 위해서는 최하위행 모드에서 다음과 같은 방법을 사용한다.

 

: set all

 

:set all
--- Options ---
  ambiwidth=single  nocopyindent          formatoptions=tcq   keymodel=           modifiable          remap             noshowfulltag         tagbsearch          ttybuiltin          wildignore=
noautoindent          cpoptions=aABceFs   formatprg=          keywordprg=man    nomodified            report=2          noshowmatch           taglength=0         ttyfast           nowildignorecase
noautoread            debug=              fsync               laststatus=1        more                scroll=22           showmode            tagrelative         ttyscroll=999       wildmode=full
noautowrite         nodelcombine        nogdefault          nolazyredraw          mouse=              scrolljump=1        showtabline=1       tags=./tags,tags    ttytype=xterm       window=44
noautowriteall        display=            helpheight=20       lines=45            mousemodel=extend   scrolloff=0         sidescroll=0        tagstack            undolevels=1000     winheight=1
  background=light  noedcompatible      nohidden            nolist                mousetime=500     nosecure              sidescrolloff=0     term=xterm          undoreload=10000  nowinfixheight
nobackup              encoding=utf-8      history=50          listchars=eol:$   nonumber              selectmode=       nosmartcase           termencoding=       updatecount=200     winminheight=1
  backupcopy=auto     endofline         nohlsearch            loadplugins         operatorfunc=       shell=/bin/bash   nosmarttab          noterse               updatetime=4000     wrap
  backupext=~         equalalways       noignorecase          magic             nopaste               shellcmdflag=-c     softtabstop=0       textauto            verbose=0           wrapmargin=0
  backupskip=/tmp/*   equalprg=           iminsert=0          matchtime=5         pastetoggle=        shellquote=       nosplitbelow        notextmode            verbosefile=        wrapscan
nobinary            noerrorbells          imsearch=0          maxcombine=2        patchmode=          shelltemp           startofline         textwidth=0       novisualbell          write
nobomb                esckeys           noincsearch           maxmapdepth=1000  nopreserveindent      shellxquote=        swapfile          notildeop             warn              nowriteany
  buflisted         noexpandtab         noinfercase           maxmem=2013186      prompt              shellxescape=       swapsync=fsync      timeout           noweirdinvert         writebackup
  cmdheight=1       noexrc              noinsertmode          maxmemtot=2013186 noreadonly          noshiftround          switchbuf=          timeoutlen=1000     whichwrap=b,s       writedelay=0
  columns=210         fileformat=unix     isprint=@,161-255 nomodeline            regexpengine=0      shiftwidth=8        tabpagemax=10     nottimeout            wildchar=<Tab>
nocompatible        nofileignorecase      joinspaces          modelines=5       norelativenumber    noshortname           tabstop=8           ttimeoutlen=-1      wildcharm=0
  backspace=indent,eol,start
  backupdir=.,~/tmp,~/
  casemap=internal,keepascii
  directory=.,~/tmp,/var/tmp,/tmp
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  fileformats=unix,dos
  fillchars=vert:|,fold:-
  formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
  helpfile=/usr/share/vim/vim74/doc/vi_help.txt
  highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignC
olumn,*:TabLine,#:TabLineSel,_:TabLineFill
  isfname=@,48-57,/,.,-,_,+,,,#,$,%,~,=
  isident=@,48-57,_,192-255
  iskeyword=@,48-57,_,192-255
  matchpairs=(:),{:},[:]
  maxmempattern=1000
  nrformats=octal,hex
  paragraphs=IPLPPPQPP TPHPLIPpLpItpplpipbp
  path=.,/usr/include,,
  runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,~/.vim/after
  sections=SHNHH HUnhsh
  selection=inclusive
  shellredir=>%s 2>&1
  shortmess=filnxtToO
  suffixes=.bak,~,.o,.h,.info,.swp,.obj

 

- 탭 간격 조정

: set tabstop=tapspace

 

- 라인 번호 달기

: set nu

 

- 상태표시행에 모드를 표시하거나 표시하지 않거나를 설정

: set noshowmode

 

- 지정된 기능 변경

: set directory=/
반응형