aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/compiler.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-17 11:53:31 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-17 11:53:31 +1200
commit670c735799879ae066b9a5249356a4d872514951 (patch)
tree994ec8145503f6515e83cd6284e1f4bca85b6ad6 /vim/autoload/compiler.vim
parent9015b6d8c391ca3974b5a9121031f50525ecb12c (diff)
downloaddotfiles-670c735799879ae066b9a5249356a4d872514951.tar.gz
dotfiles-670c735799879ae066b9a5249356a4d872514951.zip
Use autoload function for temp-makeprg :lmake
Diffstat (limited to 'vim/autoload/compiler.vim')
-rw-r--r--vim/autoload/compiler.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/autoload/compiler.vim b/vim/autoload/compiler.vim
new file mode 100644
index 00000000..37e46275
--- /dev/null
+++ b/vim/autoload/compiler.vim
@@ -0,0 +1,11 @@
+function! compiler#Make(compiler) abort
+ if exists('b:current_compiler')
+ let l:save_compiler = b:current_compiler
+ endif
+ execute 'compiler ' . a:compiler
+ lmake!
+ lwindow
+ if exists('l:save_compiler')
+ execute 'compiler ' . l:save_compiler
+ endif
+endfunction