기본개념
vim 컬러변경, 셋팅, 자동완성
우와해커
2020. 1. 26. 07:36
,https://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax
설정파일
~/.vimrc
한글꺠짐 방지
set fencs=utf-8,euckr
set nu
set ts=4
set autoindent
hi Comment ctermfg=white
hi Constant ctermfg=10
hi Special ctermfg=white
hi Statement ctermfg=LightRed
hi Normal ctermfg=yellow
Vim의 기본 자동완성이라 할 수 있다.
<C-p>: ctrl + p 를 의미한다.
<C-n>: ctrl + n 을 의미한다.
insert 모드에서 <C-p> 또는 <C-n>을 입력하면, complete옵션에서 지정한 위치의 키워드를 기반으로 자동완성해준다.
IDE의 자동완성과는 다르게, 주석이나 문자열 안에 있는 단어들도 모두 찾아준다.
보통은 아무런 설정 없이 insert 모드에서 <C-p>, <C-n> 만 눌러도 vim의 단어 완성을 사용할 수 있다.
더 자세히 알고 싶지 않다면 아래의 complete 옵션은 읽지 않아도 좋다.
javascript vim
https://medium.com/vim-drops/javascript-autocompletion-on-vim-4fea7f6934e2