diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-30 12:03:26 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-30 12:03:26 -0800 |
| commit | e2282f9cfbf47fcbc0cf637507215dadb8cb1fc5 (patch) | |
| tree | 8a080ee809e9f3ec18fad48ede8551121d485825 /src/etc/vim/compiler | |
| parent | ebee4b4b37bc860accb8ad41946edfd5acdfc6a8 (diff) | |
| parent | 017b3a543182006fa64bdc8c721969ae38c125f9 (diff) | |
| download | rust-e2282f9cfbf47fcbc0cf637507215dadb8cb1fc5.tar.gz rust-e2282f9cfbf47fcbc0cf637507215dadb8cb1fc5.zip | |
rollup merge of #21738: steveklabnik/move_out_editors
As we grow, these don't belong in-tree. http://internals.rust-lang.org/t/moving-editor-highlighting-into-their-own-repos/1395 * https://github.com/rust-lang/rust.vim * https://github.com/rust-lang/rust-mode * https://github.com/rust-lang/gedit-config * https://github.com/rust-lang/kate-config * https://github.com/rust-lang/nano-config * https://github.com/rust-lang/zsh-config
Diffstat (limited to 'src/etc/vim/compiler')
| -rw-r--r-- | src/etc/vim/compiler/cargo.vim | 65 | ||||
| -rw-r--r-- | src/etc/vim/compiler/rustc.vim | 33 |
2 files changed, 0 insertions, 98 deletions
diff --git a/src/etc/vim/compiler/cargo.vim b/src/etc/vim/compiler/cargo.vim deleted file mode 100644 index ed487a308e1..00000000000 --- a/src/etc/vim/compiler/cargo.vim +++ /dev/null @@ -1,65 +0,0 @@ -" Vim compiler file -" Compiler: Cargo Compiler -" Maintainer: Damien Radtke <damienradtke@gmail.com> -" Latest Revision: 2014 Sep 24 - -if exists('current_compiler') - finish -endif -runtime compiler/rustc.vim -let current_compiler = "cargo" - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal <args> -endif - -if exists('g:cargo_makeprg_params') - execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' -else - CompilerSet makeprg=cargo\ $* -endif - -" Allow a configurable global Cargo.toml name. This makes it easy to -" support variations like 'cargo.toml'. -let s:cargo_manifest_name = get(g:, 'cargo_manifest_name', 'Cargo.toml') - -function! s:is_absolute(path) - return a:path[0] == '/' || a:path =~ '[A-Z]\+:' -endfunction - -let s:local_manifest = findfile(s:cargo_manifest_name, '.;') -if s:local_manifest != '' - let s:local_manifest = fnamemodify(s:local_manifest, ':p:h').'/' - augroup cargo - au! - au QuickfixCmdPost make call s:FixPaths() - augroup END - - " FixPaths() is run after Cargo, and is used to change the file paths - " to be relative to the current directory instead of Cargo.toml. - function! s:FixPaths() - let qflist = getqflist() - let manifest = s:local_manifest - for qf in qflist - if !qf.valid - let m = matchlist(qf.text, '(file://\(.*\))$') - if !empty(m) - let manifest = m[1].'/' - " Manually strip another slash if needed; usually just an - " issue on Windows. - if manifest =~ '^/[A-Z]\+:/' - let manifest = manifest[1:] - endif - endif - continue - endif - let filename = bufname(qf.bufnr) - if s:is_absolute(filename) - continue - endif - let qf.filename = simplify(manifest.filename) - call remove(qf, 'bufnr') - endfor - call setqflist(qflist, 'r') - endfunction -endif diff --git a/src/etc/vim/compiler/rustc.vim b/src/etc/vim/compiler/rustc.vim deleted file mode 100644 index f9b854ed049..00000000000 --- a/src/etc/vim/compiler/rustc.vim +++ /dev/null @@ -1,33 +0,0 @@ -" Vim compiler file -" Compiler: Rust Compiler -" Maintainer: Chris Morgan <me@chrismorgan.info> -" Latest Revision: 2013 Jul 12 - -if exists("current_compiler") - finish -endif -let current_compiler = "rustc" - -let s:cpo_save = &cpo -set cpo&vim - -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal <args> -endif - -if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent == 1 - CompilerSet makeprg=rustc -else - CompilerSet makeprg=rustc\ \% -endif - -CompilerSet errorformat= - \%f:%l:%c:\ %t%*[^:]:\ %m, - \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, - \%-G%f:%l\ %s, - \%-G%*[\ ]^, - \%-G%*[\ ]^%*[~], - \%-G%*[\ ]... - -let &cpo = s:cpo_save -unlet s:cpo_save |
