@@ -60,24 +60,24 @@ onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
60
60
61
61
" Commands {{{1
62
62
63
- " :Run will compile and run the current file. If it has unsaved changes, they
64
- " will be saved first. If it has no path, it will be written to a temporary
65
- " file first. The generated binary is always placed in a temporary directory,
66
- " but run from the current directory.
63
+ " :RustRun will compile and run the current file. If it has unsaved changes,
64
+ " they will be saved first. If it has no path, it will be written to a
65
+ " temporary file first. The generated binary is always placed in a temporary
66
+ " directory, but run from the current directory.
67
67
"
68
- " The arguments passed to :Run will be passed to the generated binary.
68
+ " The arguments passed to :RustRun will be passed to the generated binary.
69
69
"
70
70
" If ! is specified, the arguments are given to rustc as well. A -- argument
71
71
" separates rustc args from the args passed to the binary.
72
72
"
73
73
" If g:rustc_path is defined, it is used as the path to rustc. Otherwise it is
74
74
" assumed that rustc is in $PATH.
75
- command ! -nargs =* -complete =file - bang - bar - buffer Run call rust#Run (<bang> 0 , [<f-args> ])
75
+ command ! -nargs =* -complete =file - bang - bar - buffer RustRun call rust#Run (<bang> 0 , [<f-args> ])
76
76
77
- " :Expand will expand the current file using --pretty.
77
+ " :RustExpand will expand the current file using --pretty.
78
78
"
79
- " Any arguments given to :Expand will be passed to rustc. This is largely so
80
- " you can pass various --cfg configurations.
79
+ " Any arguments given to :RustExpand will be passed to rustc. This is largely
80
+ " so you can pass various --cfg configurations.
81
81
"
82
82
" If ! is specified, the first argument will be interpreted as the --pretty
83
83
" type. Otherwise it will default to 'expanded'.
@@ -87,14 +87,14 @@ command! -nargs=* -complete=file -bang -bar -buffer Run call rust#Run(<bang>0, [
87
87
"
88
88
" If g:rustc_path is defined, it is used as the path to rustc. Otherwise it is
89
89
" assumed that rustc is in $PATH.
90
- command ! -nargs =* -complete =customlist ,rust#CompleteExpand - bang - bar - buffer Expand call rust#Expand (<bang> 0 , [<f-args> ])
90
+ command ! -nargs =* -complete =customlist ,rust#CompleteExpand - bang - bar - buffer RustExpand call rust#Expand (<bang> 0 , [<f-args> ])
91
91
92
92
" Mappings {{{1
93
93
94
- " Bind ⌘R in MacVim to :Run
95
- nnoremap <silent> <buffer> <D-r> :Run <CR>
96
- " Bind ⌘⇧R in MacVim to :Run ! pre-filled with the last args
97
- nnoremap <buffer> <D-R> :Run ! <C-r> =join(b:rust_last_rustc_args)<CR><C-\> erust#AppendCmdLine(' -- ' . join(b:rust_last_args))<CR>
94
+ " Bind ⌘R in MacVim to :RustRun
95
+ nnoremap <silent> <buffer> <D-r> :RustRun <CR>
96
+ " Bind ⌘⇧R in MacVim to :RustRun ! pre-filled with the last args
97
+ nnoremap <buffer> <D-R> :RustRun ! <C-r> =join(b:rust_last_rustc_args)<CR><C-\> erust#AppendCmdLine(' -- ' . join(b:rust_last_args))<CR>
98
98
99
99
if ! exists (" b:rust_last_rustc_args" ) || ! exists (" b:rust_last_args" )
100
100
let b: rust_last_rustc_args = []
@@ -112,8 +112,8 @@ let b:undo_ftplugin = "
112
112
\| unlet ! b: delimitMate_excluded_regions
113
113
\| endif
114
114
\| unlet ! b: rust_last_rustc_args b: rust_last_args
115
- \| delcommand Run
116
- \| delcommand Expand
115
+ \| delcommand RustRun
116
+ \| delcommand RustExpand
117
117
\| nunmap <buffer> <D-r>
118
118
\| nunmap <buffer> <D-R>
119
119
\| nunmap <buffer> [[
0 commit comments