From bd3bebcf60793477da390471d6d00a5523d716b4 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Thu, 29 May 2014 23:43:52 -0700 Subject: Rename :Run and :Expand to :RustRun and :RustExpand --- src/etc/vim/ftplugin/rust.vim | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/etc/vim/ftplugin') diff --git a/src/etc/vim/ftplugin/rust.vim b/src/etc/vim/ftplugin/rust.vim index fee59b58687..6e373b2ddc4 100644 --- a/src/etc/vim/ftplugin/rust.vim +++ b/src/etc/vim/ftplugin/rust.vim @@ -60,24 +60,24 @@ onoremap ]] :call rust#Jump('o', 'Forward') " Commands {{{1 -" :Run will compile and run the current file. If it has unsaved changes, they -" will be saved first. If it has no path, it will be written to a temporary -" file first. The generated binary is always placed in a temporary directory, -" but run from the current directory. +" :RustRun will compile and run the current file. If it has unsaved changes, +" they will be saved first. If it has no path, it will be written to a +" temporary file first. The generated binary is always placed in a temporary +" directory, but run from the current directory. " -" The arguments passed to :Run will be passed to the generated binary. +" The arguments passed to :RustRun will be passed to the generated binary. " " If ! is specified, the arguments are given to rustc as well. A -- argument " separates rustc args from the args passed to the binary. " " If g:rustc_path is defined, it is used as the path to rustc. Otherwise it is " assumed that rustc is in $PATH. -command! -nargs=* -complete=file -bang -bar -buffer Run call rust#Run(0, []) +command! -nargs=* -complete=file -bang -bar -buffer RustRun call rust#Run(0, []) -" :Expand will expand the current file using --pretty. +" :RustExpand will expand the current file using --pretty. " -" Any arguments given to :Expand will be passed to rustc. This is largely so -" you can pass various --cfg configurations. +" Any arguments given to :RustExpand will be passed to rustc. This is largely +" so you can pass various --cfg configurations. " " If ! is specified, the first argument will be interpreted as the --pretty " type. Otherwise it will default to 'expanded'. @@ -87,14 +87,14 @@ command! -nargs=* -complete=file -bang -bar -buffer Run call rust#Run(0, [ " " If g:rustc_path is defined, it is used as the path to rustc. Otherwise it is " assumed that rustc is in $PATH. -command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -bar -buffer Expand call rust#Expand(0, []) +command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -bar -buffer RustExpand call rust#Expand(0, []) " Mappings {{{1 -" Bind ⌘R in MacVim to :Run -nnoremap :Run -" Bind ⌘⇧R in MacVim to :Run! pre-filled with the last args -nnoremap :Run! =join(b:rust_last_rustc_args)erust#AppendCmdLine(' -- ' . join(b:rust_last_args)) +" Bind ⌘R in MacVim to :RustRun +nnoremap :RustRun +" Bind ⌘⇧R in MacVim to :RustRun! pre-filled with the last args +nnoremap :RustRun! =join(b:rust_last_rustc_args)erust#AppendCmdLine(' -- ' . join(b:rust_last_args)) if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args") let b:rust_last_rustc_args = [] @@ -112,8 +112,8 @@ let b:undo_ftplugin = " \|unlet! b:delimitMate_excluded_regions \|endif \|unlet! b:rust_last_rustc_args b:rust_last_args - \|delcommand Run - \|delcommand Expand + \|delcommand RustRun + \|delcommand RustExpand \|nunmap \|nunmap \|nunmap [[ -- cgit 1.4.1-3-g733a5