nginx 를 셋팅 하다 


$cat /etc/nginx/nginx.conf  와 같은 파일을 vi 로 열면 모두 거무튀튀 하게 보인다. 

주석과 구분이 안될 때 vim 설정을 하면 컬러풀하게 나오게 된다. 


참조: http://www.vim.org/scripts/script.php?script_id=1886


1. vim 의 syntex 폴더에 위의 링크에서 받은 최신 버젼 nginx.vim 을 넣고 

2. filetype.vim 파일을 찾아서 

...

augroup filetypedetect


" Ignored extensions

if exists("*fnameescape")

아래에 밑의 줄을 넣으면 완료. 


au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif 



linux에 따라 위치가 다르면 

find / -name *.vim 및 find / -name filetype.vim 으로 검색을 하면 syntex 폴더 및 파일을 를 찾을 수 있다. 






+ Recent posts