당신은 -c
옵션을 사용할 수 있습니다. 또한 명령을 첫 번째 파일이로드 후 을 실행하는 --cmd
를 사용할 수
vim -c 'set filetype=javascript'
-
상황에, 당신은 단순히 표준 set filetype
명령을 사용할 수 있습니다.
은 정력 맨 페이지에서 드러내 : -c {command}
{command} will be executed after the first file has been read. {command} is interpreted as an Ex command. If the {command} contains spaces it must be enclosed in double quotes (this depends on the shell that is used).
Example: Vim "+set si" main.c
Note: You can use up to 10 "+" or "-c" commands.
--cmd {command}
Like using "-c", but the command is executed just before processing any vimrc file. You can use up to 10 of these commands, independently from "-c" commands.
출처
2016-07-18 15:32:25
Lix
추가 세트 피트 = CPP를에 ~ /의 .vimrc하지만,이 방식으로 열린 모든 파일이 CPP 파일로 처리됩니다. –
@LeeHoYo 내가 사용하는 유일한 파일 형식이 아니며 –
@LeeHoYo - 모든 파일에 대해 설정됩니다. OP는 특정 파일을 열 때이를 설정하려고합니다. – Lix