% is replaced with the current file name *:_%*
# is replaced with the alternate file name *:_#*
#n (where n is a number) is replaced with the file name of
buffer n. "#0" is the same as "#"
## is replaced with all names in the argument list *:_##*
concatenated, separated by spaces. Each space in a name
is preceded with a backslash.
Note that these give the file name as it was typed. If an absolute path is
needed (when using the file name from a different directory), you need to add
":p". See |filename-modifiers|.
Note that backslashes are inserted before spaces, so that the command will
correctly interpret the file name. But this doesn't happen for shell
commands. For those you probably have to use quotes: >
:!ls "%"
:r !spell "%"
!g++ "파일이름" 프로그램이름이렇게도 되겟지만제가 원하는건
!g++ "파일이름" 프로그램이름
이렇게도 되겟지만
제가 원하는건
%사용하면서 입니다.
별로 좋지 않습니다.소스 파일명에 공백이 들어가는 것은.. 쌍수들고
별로 좋지 않습니다.
소스 파일명에 공백이 들어가는 것은.. 쌍수들고 말려야하는 일인데..
말리는 일은 말리는 일이고, vi의 파일명 치환에 관해서라면...
:!g++ "%" 로 되는 것 같습니다만..?
---
http://coolengineer.com
그게 되나요?...전 안되던데...
그게 되나요?...
전 안되던데...
음.. 제 VIM은 6.2 인데요.. 버전타나...:help :_
음.. 제 VIM은 6.2 인데요.. 버전타나...
:help :_%
해보세요. 예제에도 있습니다.
---
http://coolengineer.com
댓글 달기