Fixed vim and zsh
This commit is contained in:
1657
vim/plugins/singlecompile/autoload/SingleCompile.vim
Normal file
1657
vim/plugins/singlecompile/autoload/SingleCompile.vim
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,27 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#ada#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('ada', 'gnat', 'GNAT', 'gnat',
|
||||
\'make', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('ada', 'gnat', g:SingleCompile_common_out_file)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#bash#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('bash', 'bash',
|
||||
\'Bourne-Again Shell', 'bash', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
141
vim/plugins/singlecompile/autoload/SingleCompile/templates/c.vim
Normal file
141
vim/plugins/singlecompile/autoload/SingleCompile/templates/c.vim
Normal file
@ -0,0 +1,141 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#c#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('c', 'open-watcom',
|
||||
\'Open Watcom C/C++32 Compiler', 'wcl386', '',
|
||||
\g:SingleCompile_common_run_command, function('SingleCompile#DetectWatcom'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'open-watcom', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoWatcom'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoWatcom'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('c', 'msvc',
|
||||
\'Microsoft Visual C++ (In PATH)', 'cl',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'msvc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'msvc80',
|
||||
\ 'Microsoft Visual C++ 2005 (8.0)', 'cl80',
|
||||
\ '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'msvc80', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 15,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'msvc90',
|
||||
\ 'Microsoft Visual C++ 2008 (9.0)', 'cl90',
|
||||
\ ' ', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'msvc90', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 14,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'msvc100',
|
||||
\ 'Microsoft Visual C++ 2010 (10.0)', 'cl100',
|
||||
\ ' ', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'msvc100', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 13,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'msvc110',
|
||||
\ 'Microsoft Visual C++ 2012 (11.0)', 'cl110',
|
||||
\ ' ', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'msvc110', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 12,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'bcc',
|
||||
\'Borland C++ Builder', 'bcc32',
|
||||
\'-o$(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'bcc', g:SingleCompile_common_out_file)
|
||||
endif
|
||||
call SingleCompile#SetCompilerTemplate('c', 'gcc', 'GNU C Compiler',
|
||||
\'gcc', '-g -o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'gcc', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoGcc'),
|
||||
\ 'priority' : 20,
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'icc',
|
||||
\'Intel C++ Compiler', 'icc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'icc', g:SingleCompile_common_out_file)
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('c', 'lcc',
|
||||
\'Little C Compiler', 'lc',
|
||||
\'$(FILE_TITLE)$ -o "$(FILE_TITLE)$.exe"',
|
||||
\g:SingleCompile_common_run_command)
|
||||
else
|
||||
call SingleCompile#SetCompilerTemplate('c', 'lcc',
|
||||
\'Little C Compiler', 'lc',
|
||||
\'$(FILE_TITLE)$ -o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
endif
|
||||
call SingleCompile#SetOutfile('c', 'lcc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'pcc',
|
||||
\'Portable C Compiler', 'pcc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'pcc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'tcc', 'Tiny C Compiler',
|
||||
\'tcc', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'tcc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'tcc-run',
|
||||
\'Tiny C Compiler with "-run" Flag', 'tcc', '-run', '')
|
||||
call SingleCompile#SetPriority('c', 'tcc-run', 140)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'ch',
|
||||
\'SoftIntegration Ch', 'ch', '', '')
|
||||
call SingleCompile#SetPriority('c', 'ch', 130)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'clang',
|
||||
\ 'the Clang C and Objective-C compiler', 'clang',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'clang', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoClang'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
if has('unix')
|
||||
call SingleCompile#SetCompilerTemplate('c', 'cc',
|
||||
\'UNIX C Compiler', 'cc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('c', 'cc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('c', 'sol-studio',
|
||||
\'Sun C Compiler (Sun Solaris Studio)', 'suncc',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('c', 'sol-studio', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoSolStudioC'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
call SingleCompile#SetCompilerTemplate('c', 'open64',
|
||||
\'Open64 C Compiler', 'opencc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#cmake#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('cmake', 'cmake', 'cmake',
|
||||
\'cmake', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2013 Rack Lin
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#coffee#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('coffee', 'coffee',
|
||||
\'CoffeeScript', 'coffee', '-c $(FILE_NAME)$', 'coffee $(FILE_NAME)$')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,120 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#cpp#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'open-watcom',
|
||||
\'Open Watcom C/C++32 Compiler',
|
||||
\ 'wcl386', '', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectWatcom'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'open-watcom', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoWatcom'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoWatcom'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'msvc',
|
||||
\'Microsoft Visual C++ (In PATH)', 'cl',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('cpp', 'msvc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'msvc80',
|
||||
\ 'Microsoft Visual C++ 2005 (8.0)', 'cl80',
|
||||
\ '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc80', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 15,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'msvc90',
|
||||
\ 'Microsoft Visual C++ 2008 (9.0)', 'cl90',
|
||||
\ '/EHsc', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc90', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 14,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'msvc100',
|
||||
\ 'Microsoft Visual C++ 2010 (10.0)', 'cl100',
|
||||
\ '/EHsc', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc100', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 13,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'msvc110',
|
||||
\ 'Microsoft Visual C++ 2012 (11.0)', 'cl110',
|
||||
\ '/EHsc', g:SingleCompile_common_run_command,
|
||||
\ function('SingleCompile#DetectMicrosoftVC'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc110', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
|
||||
\ 'out-file' : g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 12,
|
||||
\ 'vim-compiler' : 'msvc'})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'bcc',
|
||||
\'Borland C++ Builder','bcc32', '-o$(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('cpp', 'bcc', g:SingleCompile_common_out_file)
|
||||
endif
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'g++',
|
||||
\'GNU C++ Compiler', 'g++', '-g -o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'g++', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoGcc'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file,
|
||||
\ 'priority' : 20,
|
||||
\ 'vim-compiler': 'gcc'
|
||||
\})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'icc',
|
||||
\'Intel C++ Compiler', 'icc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('cpp', 'icc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'ch',
|
||||
\'SoftIntegration Ch', 'ch', '', '')
|
||||
call SingleCompile#SetPriority('cpp', 'ch', 130)
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'clang',
|
||||
\ 'the Clang C and Objective-C compiler',
|
||||
\'clang++', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'clang', {
|
||||
\ 'pre-do' : function('SingleCompile#PredoClang'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file,
|
||||
\ 'vim-compiler': 'clang'
|
||||
\})
|
||||
if has('unix')
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'sol-studio',
|
||||
\'Sun C++ Compiler (Sun Solaris Studio)', 'sunCC',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetCompilerTemplateByDict('cpp', 'sol-studio',{
|
||||
\ 'pre-do' : function('SingleCompile#PredoSolStudioC'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
call SingleCompile#SetCompilerTemplate('cpp', 'open64',
|
||||
\'Open64 C++ Compiler', 'openCC',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('cpp', 'open64', g:SingleCompile_common_out_file)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,39 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#cs#Initialize()
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('cs', 'msvcs',
|
||||
\'Microsoft Visual C#', 'csc', '',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('cs', 'msvcs',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetPriority('cs', 'msvcs', 50)
|
||||
call SingleCompile#SetVimCompiler('cs', 'msvcs', 'cs')
|
||||
endif
|
||||
call SingleCompile#SetCompilerTemplate('cs', 'mono',
|
||||
\'Mono C# compiler', 'mcs', '',
|
||||
\'mono $(FILE_TITLE)$'.'.exe')
|
||||
call SingleCompile#SetOutfile('cs', 'mono',
|
||||
\'$(FILE_TITLE)$'.'.exe')
|
||||
call SingleCompile#SetVimCompiler('cs', 'mono', 'mcs')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,29 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#csh#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('csh', 'csh',
|
||||
\'C Shell', 'csh', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('csh', 'tcsh',
|
||||
\'TENEX C shell', 'tcsh', '', '')
|
||||
call SingleCompile#SetPriority('csh', 'tcsh', 80)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#d#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('d', 'dmd', 'DMD Compiler',
|
||||
\'dmd', '', g:SingleCompile_common_run_command)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,30 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#dosbatch#Initialize()
|
||||
if has('win32')
|
||||
let l:cmd_path = $SYSTEMROOT . '\System32\cmd.exe'
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('dosbatch', 'dosbatch',
|
||||
\'DOS Batch', l:cmd_path, '/C', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,27 @@
|
||||
" Copyright (C) 2015 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#elixir#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('elixir', 'elixir',
|
||||
\'Elixir', 'elixir', '', '')
|
||||
endfunction
|
||||
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#erlang#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('erlang', 'escript',
|
||||
\'Erlang Scripting Support', 'escript', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,93 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#fortran#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'gfortran',
|
||||
\'GNU Fortran Compiler', 'gfortran',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'gfortran',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetPriority('fortran', 'gfortran', 70)
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'g95',
|
||||
\'G95', 'g95', '-o $(FILE_TITLE)$'.SingleCompile#GetExecutableSuffix(),
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'g95', g:SingleCompile_common_out_file)
|
||||
if has('unix')
|
||||
call SingleCompile#SetCompilerTemplate('fortran',
|
||||
\'sol-studio-f77',
|
||||
\'Sun Fortran 77 Compiler (Sun Solaris Studio)',
|
||||
\'sunf77', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'sol-studio-f77',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('fortran',
|
||||
\'sol-studio-f90',
|
||||
\'Sun Fortran 90 Compiler (Sun Solaris Studio)',
|
||||
\'sunf90', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'sol-studio-f90',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('fortran',
|
||||
\'sol-studio-f95',
|
||||
\'Sun Fortran 95 Compiler (Sun Solaris Studio)',
|
||||
\'sunf95', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'sol-studio-f95',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'open64-f90',
|
||||
\'Open64 Fortran 90 Compiler', 'openf90',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'open64-f90',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'open64-f95',
|
||||
\'Open64 Fortran 95 Compiler', 'openf95',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'open64-f95',
|
||||
\g:SingleCompile_common_out_file)
|
||||
endif
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'ftn95',
|
||||
\'Silverfrost FTN95', 'ftn95', '$(FILE_NAME)$ /LINK',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'ftn95',
|
||||
\g:SingleCompile_common_out_file)
|
||||
endif
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'g77',
|
||||
\'GNU Fortran 77 Compiler', 'g77', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'g77', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetVimCompiler('fortran', 'g77', 'fortran_g77')
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'ifort',
|
||||
\'Intel Fortran Compiler', 'ifort', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('fortran', 'ifort', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetPriority('fortran', 'ifort', 80)
|
||||
call SingleCompile#SetCompilerTemplate('fortran', 'open-watcom',
|
||||
\'Open Watcom Fortran 77/32 Compiler', 'wfl386', '',
|
||||
\g:SingleCompile_common_run_command, function('SingleCompile#DetectWatcom'))
|
||||
call SingleCompile#SetCompilerTemplateByDict('fortran', 'open-watcom',
|
||||
\{
|
||||
\ 'pre-do' : function('SingleCompile#PredoWatcom'),
|
||||
\ 'post-do' : function('SingleCompile#PostdoWatcom'),
|
||||
\ 'out-file': g:SingleCompile_common_out_file
|
||||
\})
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,27 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#go#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('go', 'go', 'Go',
|
||||
\ 'go', 'build -o $(FILE_EXEC)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetPriority('go', 'Go', 20)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,30 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#haskell#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('haskell', 'ghc',
|
||||
\'Glasgow Haskell Compiler', 'ghc', '-o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('haskell', 'ghc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('haskell', 'runhaskell',
|
||||
\'runhaskell', 'runhaskell', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,51 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#html#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('html', 'firefox',
|
||||
\'Mozilla Firefox', 'firefox', '', '')
|
||||
call SingleCompile#SetPriority('html', 'firefox', 60)
|
||||
call SingleCompile#SetCompilerTemplate('html', 'chrome',
|
||||
\'Google Chrome', 'google-chrome', '', '')
|
||||
call SingleCompile#SetPriority('html', 'chrome', 70)
|
||||
call SingleCompile#SetCompilerTemplate('html', 'chromium',
|
||||
\'Chromium', 'chromium', '', '')
|
||||
call SingleCompile#SetPriority('html', 'chromium', 71)
|
||||
call SingleCompile#SetCompilerTemplate('html', 'opera', 'Opera',
|
||||
\'opera', '', '')
|
||||
call SingleCompile#SetPriority('html', 'opera', 80)
|
||||
call SingleCompile#SetCompilerTemplate('html', 'konqueror',
|
||||
\'Konqueror', 'konqueror', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('html', 'arora',
|
||||
\'Arora', 'arora', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('html', 'epiphany',
|
||||
\'Epiphany', 'epiphany', '', '')
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('html', 'ie',
|
||||
\'Microsoft Internet Explorer', 'iexplore', '', '',
|
||||
\function('SingleCompile#DetectIe'))
|
||||
call SingleCompile#SetPriority('html', 'ie', 50)
|
||||
else
|
||||
call SingleCompile#SetCompilerTemplate('html', 'ie',
|
||||
\'Microsoft Internet Explorer', 'iexplore', '', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,32 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#idlang#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('idlang', 'idl',
|
||||
\'ITT Visual Information Solutions '.
|
||||
\'Interactive Data Language', 'idl',
|
||||
\"-quiet -e '.run $(FILE_NAME)$'", '')
|
||||
call SingleCompile#SetPriority('idlang', 'idl', 70)
|
||||
call SingleCompile#SetCompilerTemplate('idlang', 'gdl',
|
||||
\'GNU Data Language incremental compiler',
|
||||
\'gdl', "-quiet -e '.run $(FILE_NAME)$'", '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,34 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#java#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('java', 'sunjdk',
|
||||
\ 'Sun Java Development Kit', 'javac', '',
|
||||
\'java $(FILE_TITLE)$')
|
||||
call SingleCompile#SetOutfile('java', 'sunjdk',
|
||||
\'$(FILE_TITLE)$'.'.class')
|
||||
call SingleCompile#SetVimCompiler('java', 'sunjdk', 'javac')
|
||||
call SingleCompile#SetPriority('java', 'sunjdk', 70)
|
||||
call SingleCompile#SetCompilerTemplate('java', 'gcj',
|
||||
\'GNU Java Compiler', 'gcj', '', 'java $(FILE_TITLE)$')
|
||||
call SingleCompile#SetOutfile('java', 'gcj', '$(FILE_TITLE)$'.'.class')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,35 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#javascript#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('javascript', 'gjs',
|
||||
\'Javascript Bindings for GNOME', 'gjs', '', '')
|
||||
call SingleCompile#SetPriority('javascript', 'gjs', 120)
|
||||
call SingleCompile#SetCompilerTemplate('javascript', 'js',
|
||||
\'SpiderMonkey, a JavaScript engine written in C',
|
||||
\'js', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('javascript', 'node.js',
|
||||
\'node.js', 'node', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('javascript', 'rhino',
|
||||
\'Rhino, a JavaScript engine written in Java',
|
||||
\'rhino', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#ksh#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('ksh', 'ksh',
|
||||
\'Korn Shell', 'ksh', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,30 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#lisp#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('lisp', 'clisp', 'GNU CLISP',
|
||||
\'clisp', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('lisp', 'ecl',
|
||||
\'Embeddable Common-Lisp', 'ecl', '-shell', '')
|
||||
call SingleCompile#SetCompilerTemplate('lisp', 'gcl',
|
||||
\'GNU Common Lisp', 'gcl', '-batch -load', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,27 @@
|
||||
" Copyright (C) 2010-2012 Rack Lin
|
||||
"
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#ls#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('ls', 'lsc',
|
||||
\'LiveScript', 'lsc', '-c $(FILE_NAME)$', 'lsc $(FILE_NAME)$')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#lua#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('lua', 'lua',
|
||||
\'Lua Interpreter', 'lua', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,47 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! s:DetectGmake(not_used_arg)
|
||||
let l:make_command = s:DetectCompilerGenerally('gmake')
|
||||
if l:make_command != 0
|
||||
return l:make_command
|
||||
endif
|
||||
|
||||
let l:make_command = s:DetectCompilerGenerally('make')
|
||||
if l:make_command != 0
|
||||
return l:make_command
|
||||
endif
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! SingleCompile#templates#make#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('make', 'gmake', 'GNU Make',
|
||||
\'gmake', '-f', '', function('s:DetectGmake'))
|
||||
call SingleCompile#SetCompilerTemplate('make', 'mingw32-make',
|
||||
\'MinGW32 Make', 'mingw32-make', '-f', '')
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('make', 'nmake',
|
||||
\'Microsoft Program Maintenance Utility', 'nmake',
|
||||
\'-f', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,42 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#markdown#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('markdown', 'markdown',
|
||||
\ 'text-to-HTML conversion tool', 'markdown',
|
||||
\ '-o $(FILE_TITLE)$.html',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.html"')
|
||||
call SingleCompile#SetPriority('markdown', 'markdown', 50)
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('markdown', 'rdiscount',
|
||||
\ 'Discount Markdown Processor for Ruby', 'rdiscount',
|
||||
\ '$(FILE_NAME)$ >$(FILE_TITLE)$.html',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.html"')
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('markdown', 'markdown_py',
|
||||
\ 'Discount Markdown Processor for Python', 'markdown_py',
|
||||
\ '-f $(FILE_TITLE)$.html -o html5 $(FILE_NAME)$',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.html"')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,30 @@
|
||||
" Copyright (C) 2013 PAN, Myautsai
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#matlab#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('matlab', 'matlab', 'MathWorks MATLAB',
|
||||
\'matlab', '-nodisplay -nosplash -r $(FILE_TITLE)$,exit', '')
|
||||
call SingleCompile#SetPriority('matlab', 'matlab', 50)
|
||||
call SingleCompile#SetCompilerTemplate('matlab', 'octave', 'GNU Octave',
|
||||
\'octave', '', '')
|
||||
call SingleCompile#SetPriority('matlab', 'octave', 60)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,33 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#objc#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('objc', 'clang',
|
||||
\ 'the Clang C and Objective-C compiler', 'clang',
|
||||
\ '-g -o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('objc', 'clang', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('objc', 'gcc',
|
||||
\'GNU Object-C Compiler', 'gcc', '-g -o $(FILE_TITLE)$',
|
||||
\g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('objc', 'gcc', g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetPriority('objc', 'gcc', 80)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,28 @@
|
||||
" Copyright (C) 2015 Vishesh Yadav
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#ocaml#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('ocaml', 'ocaml', 'OCaml',
|
||||
\ 'ocamlc', '-o $(FILE_TITLE)$',
|
||||
\ g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetVimCompiler('ocaml', 'ocaml', 'ocamlc')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,34 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#pascal#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('pascal', 'fpc',
|
||||
\'Free Pascal Compiler', 'fpc',
|
||||
\'', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('pascal', 'fpc',
|
||||
\g:SingleCompile_common_out_file)
|
||||
call SingleCompile#SetCompilerTemplate('pascal', 'gpc',
|
||||
\'GNU Pascal Compiler', 'gpc',
|
||||
\'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
call SingleCompile#SetOutfile('pascal', 'gpc',
|
||||
\g:SingleCompile_common_out_file)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#perl#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('perl', 'perl',
|
||||
\'Perl Interpreter', 'perl', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#php#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('php', 'php',
|
||||
\"PHP Command Line Interface 'CLI'", 'php', '-f', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,40 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#python#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('python', 'python', 'CPython (Usually the system default version. Can be Python 2 or 3.)',
|
||||
\'python', '', '')
|
||||
call SingleCompile#SetPriority('python', 'python', 50)
|
||||
call SingleCompile#SetCompilerTemplate('python', 'ironpython',
|
||||
\'IronPython', 'ipy', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('python', 'jython', 'Jython',
|
||||
\'jython', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('python', 'pypy', 'PyPy',
|
||||
\'pypy', '', '')
|
||||
call SingleCompile#SetPriority('python', 'pypy', 110)
|
||||
call SingleCompile#SetCompilerTemplate('python', 'python2',
|
||||
\'CPython 2', 'python2', '', '')
|
||||
call SingleCompile#SetPriority('python', 'python', 60)
|
||||
call SingleCompile#SetCompilerTemplate('python', 'python3',
|
||||
\'CPython 3', 'python3', '', '')
|
||||
call SingleCompile#SetPriority('python', 'python3', 120)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,29 @@
|
||||
" Copyright (C) 2014 Francisco Lopes
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#qml#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('qml', 'qmlviewer', 'qmlviewer',
|
||||
\ 'qmlviewer', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('qml', 'qmlscene', 'qmlscene',
|
||||
\ 'qmlscene', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
||||
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#r#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('r', 'R', 'R', 'R',
|
||||
\'CMD BATCH', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,33 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
" Copyright © 2012 Martin Ueding <dev@martin-ueding.de>
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#rst#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('rst', 'rst2html',
|
||||
\ 'reST-to-HTML conversion tool',
|
||||
\ 'rst2html',
|
||||
\ '$(FILE_NAME)$ $(FILE_TITLE)$.html',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.html"')
|
||||
call SingleCompile#SetOutfile('rst', 'rst2html', '"$(FILE_TITLE)$.html"')
|
||||
call SingleCompile#SetPriority('rst', 'rst2html', 50)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,44 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#ruby#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('ruby', 'ruby',
|
||||
\'Ruby Interpreter', 'ruby', '', '')
|
||||
call SingleCompile#SetPriority('ruby', 'ruby', 50)
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('ruby', 'jruby',
|
||||
\'Ruby JVM Interpreter (default Ruby version)', 'jruby', '', '')
|
||||
call SingleCompile#SetPriority('ruby', 'jruby', 55)
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('ruby', 'jruby1.8',
|
||||
\'Ruby JVM Interpreter (1.8)', 'jruby', '--1.8', '')
|
||||
call SingleCompile#SetPriority('ruby', 'jruby1.8', 80)
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('ruby', 'jruby1.9',
|
||||
\'Ruby JVM Interpreter (1.9)', 'jruby', '--1.9', '')
|
||||
call SingleCompile#SetPriority('ruby', 'jruby1.9', 60)
|
||||
|
||||
call SingleCompile#SetCompilerTemplate('ruby', 'jruby2.0',
|
||||
\'Ruby JVM Interpreter (2.0)', 'jruby', '--2.0', '')
|
||||
call SingleCompile#SetPriority('ruby', 'jruby2.0', 70)
|
||||
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2013 Francisco Lopes
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#rust#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('rust', 'rustc', 'Rust',
|
||||
\ 'rustc', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Reza Jelveh
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#scala#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('scala', 'scala',
|
||||
\'Scala Compiler', 'scala', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,43 @@
|
||||
" Copyright (C) 2010-2015 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#sh#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'shell',
|
||||
\'Guess from shebang', 'sh', '', '')
|
||||
call SingleCompile#SetPriority('sh', 'shell', 10)
|
||||
call SingleCompile#SetPredo('sh', 'shell',
|
||||
\function('SingleCompile#PredoShell'))
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'sh',
|
||||
\'Bourne Shell', 'sh', '', '')
|
||||
call SingleCompile#SetPriority('sh', 'sh', 80)
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'bash',
|
||||
\'Bourne-Again Shell', 'bash', '', '')
|
||||
call SingleCompile#SetPriority('sh', 'bash', 90)
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'ksh',
|
||||
\'Korn Shell', 'ksh', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'zsh',
|
||||
\'Z Shell', 'zsh', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'ash',
|
||||
\'Almquist Shell', 'ash', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('sh', 'dash',
|
||||
\'Debian Almquist Shell', 'dash', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,28 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#tcl#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('tcl', 'tclsh',
|
||||
\'Simple shell containing Tcl interpreter', 'tclsh',
|
||||
\'', '')
|
||||
call SingleCompile#SetVimCompiler('tcl', 'tclsh', 'tcl')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#tcsh#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('tcsh', 'tcsh',
|
||||
\'TENEX C Shell', 'tcsh', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,42 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#tex#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('tex', 'pdflatex', 'pdfLaTeX',
|
||||
\'pdflatex', '-interaction=nonstopmode',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.pdf"')
|
||||
call SingleCompile#SetPriority('tex', 'pdflatex', 50)
|
||||
call SingleCompile#SetCompilerTemplate('tex', 'latex', 'LaTeX',
|
||||
\'latex', '-interaction=nonstopmode',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.dvi"')
|
||||
call SingleCompile#SetPriority('tex', 'latex', 80)
|
||||
|
||||
" latexmk which automatically calls pdflatex, but runs it multiple times
|
||||
" to that all references are sorted out correctly.
|
||||
call SingleCompile#SetCompilerTemplate('tex', 'latexmk', 'latexmk',
|
||||
\ 'latexmk', '-pdf',
|
||||
\ SingleCompile#GetDefaultOpenCommand() .
|
||||
\ ' "$(FILE_TITLE)$.pdf"')
|
||||
call SingleCompile#SetPriority('tex', 'latexmk', 30)
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#vb#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('vb', 'vbs',
|
||||
\'VB Script Interpreter', 'cscript', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#vim#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('vim', 'vim', 'Vim',
|
||||
\'vim', '-u NONE -U NONE -e -N -n -S', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,51 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#xhtml#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'firefox',
|
||||
\'Mozilla Firefox', 'firefox', '', '')
|
||||
call SingleCompile#SetPriority('xhtml', 'firefox', 60)
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'chrome',
|
||||
\'Google Chrome', 'google-chrome', '', '')
|
||||
call SingleCompile#SetPriority('xhtml', 'chrome', 70)
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'chromium',
|
||||
\'Chromium', 'chromium', '', '')
|
||||
call SingleCompile#SetPriority('xhtml', 'chromium', 71)
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'opera',
|
||||
\'Opera', 'opera', '', '')
|
||||
call SingleCompile#SetPriority('xhtml', 'opera', 80)
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'konqueror',
|
||||
\'Konqueror', 'konqueror', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'arora',
|
||||
\'Arora', 'arora', '', '')
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'epiphany',
|
||||
\'Epiphany', 'epiphany', '', '')
|
||||
if has('win32')
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'ie',
|
||||
\'Microsoft Internet Explorer', 'iexplore', '', '',
|
||||
\function('SingleCompile#DetectIe'))
|
||||
call SingleCompile#SetPriority('xhtml', 'ie', 50)
|
||||
else
|
||||
call SingleCompile#SetCompilerTemplate('xhtml', 'ie',
|
||||
\'Microsoft Internet Explorer', 'iexplore', '', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
@ -0,0 +1,26 @@
|
||||
" Copyright (C) 2010-2012 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
function! SingleCompile#templates#zsh#Initialize()
|
||||
call SingleCompile#SetCompilerTemplate('zsh', 'zsh',
|
||||
\'Z Shell', 'zsh', '', '')
|
||||
endfunction
|
||||
|
||||
"vim703: cc=78
|
||||
"vim: et ts=4 tw=78 sw=4
|
300
vim/plugins/singlecompile/autoload/SingleCompileAsync.vim
Normal file
300
vim/plugins/singlecompile/autoload/SingleCompileAsync.vim
Normal file
@ -0,0 +1,300 @@
|
||||
" Copyright (C) 2010-2014 Hong Xu
|
||||
|
||||
" This file is part of SingleCompile.
|
||||
|
||||
" SingleCompile is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
|
||||
" SingleCompile is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SingleCompile. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
" File: autoload/SingleCompileAsync.vim
|
||||
" Version: 2.12.0
|
||||
" check doc/SingleCompile.txt for more information
|
||||
|
||||
|
||||
let s:saved_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:cur_mode = ''
|
||||
let s:mode_dict = {}
|
||||
|
||||
" python mode functions {{{1
|
||||
|
||||
function! s:InitializePython() " {{{2
|
||||
" the Initialize function of python
|
||||
|
||||
if !has('python')
|
||||
return 'Python interface is not available in this Vim.'
|
||||
endif
|
||||
|
||||
let l:ret = ''
|
||||
|
||||
python << EEOOFF
|
||||
|
||||
try:
|
||||
import vim
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
except:
|
||||
vim.command("let l:ret = 'Library import error.'")
|
||||
EEOOFF
|
||||
|
||||
if !empty(l:ret)
|
||||
return l:ret
|
||||
endif
|
||||
|
||||
python << EEOOFF
|
||||
if sys.version_info[0] < 2 or sys.version_info[1] < 6:
|
||||
vim.command("let l:ret = 'At least python 2.6 is required.'")
|
||||
EEOOFF
|
||||
|
||||
if !empty(l:ret)
|
||||
return l:ret
|
||||
endif
|
||||
|
||||
python << EEOOFF
|
||||
|
||||
class SingleCompileAsync:
|
||||
sub_proc = None
|
||||
output = None
|
||||
# This value will be set below if we are on win32. For other systems,
|
||||
# leave this as None
|
||||
startupinfo = None
|
||||
|
||||
# if we are on win32, we need to set STARTUPINFO before calling
|
||||
# subprocess.Popen() to make the console of the subprocess show minimized and
|
||||
# not actived.
|
||||
if sys.platform == 'win32':
|
||||
|
||||
# set subprocess constants
|
||||
subprocess.STARTF_USESHOWWINDOW = 1
|
||||
subprocess.SW_HIDE = 0
|
||||
|
||||
SingleCompileAsync.startupinfo = subprocess.STARTUPINFO()
|
||||
SingleCompileAsync.startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
|
||||
SingleCompileAsync.startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||
|
||||
EEOOFF
|
||||
endfunction
|
||||
|
||||
function! s:IsRunningPython() " {{{2
|
||||
" The IsRunning function of python
|
||||
|
||||
python << EEOOFF
|
||||
|
||||
if SingleCompileAsync.sub_proc != None and \
|
||||
SingleCompileAsync.sub_proc.poll() == None:
|
||||
vim.command('let l:ret_val = 1')
|
||||
else:
|
||||
vim.command('let l:ret_val = 0')
|
||||
|
||||
EEOOFF
|
||||
|
||||
return l:ret_val
|
||||
endfunction
|
||||
|
||||
function! s:RunPython(run_command) " {{{2
|
||||
" The Run function of python
|
||||
|
||||
let l:ret_val = 0
|
||||
|
||||
python << EEOOFF
|
||||
|
||||
try:
|
||||
SingleCompileAsync.sub_proc = subprocess.Popen(
|
||||
shlex.split(vim.eval('a:run_command')),
|
||||
shell = False,
|
||||
universal_newlines = True,
|
||||
startupinfo = SingleCompileAsync.startupinfo,
|
||||
stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
|
||||
|
||||
except:
|
||||
vim.command('let l:ret_val = 2')
|
||||
|
||||
EEOOFF
|
||||
|
||||
return l:ret_val
|
||||
endfunction
|
||||
|
||||
function! s:TerminatePython() " {{{2
|
||||
" The Terminate function of python
|
||||
|
||||
let l:ret_val = 0
|
||||
|
||||
python << EEOOFF
|
||||
|
||||
try:
|
||||
SingleCompileAsync.sub_proc.kill()
|
||||
except:
|
||||
vim.command('let l:ret_val = 2')
|
||||
|
||||
EEOOFF
|
||||
|
||||
return l:ret_val
|
||||
endfunction
|
||||
|
||||
function! s:GetOutputPython() " {{{2
|
||||
" The GetOutput function of python
|
||||
|
||||
python << EEOOFF
|
||||
try:
|
||||
SingleCompileAsync.tmpout = SingleCompileAsync.sub_proc.communicate()[0]
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
SingleCompileAsync.output = SingleCompileAsync.tmpout
|
||||
del SingleCompileAsync.tmpout
|
||||
|
||||
try:
|
||||
vim.command("let l:ret_val = '" +
|
||||
SingleCompileAsync.output.replace("'", "''") + "'")
|
||||
except:
|
||||
vim.command('let l:ret_val = 2')
|
||||
|
||||
EEOOFF
|
||||
|
||||
if type(l:ret_val) == type('')
|
||||
let l:ret_list = split(l:ret_val, "\n")
|
||||
unlet! l:ret_val
|
||||
let l:ret_val = l:ret_list
|
||||
endif
|
||||
|
||||
return l:ret_val
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#GetMode() " {{{1
|
||||
return s:cur_mode
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#Initialize(mode) " {{{1
|
||||
" return 1 if failed to initialize the mode;
|
||||
" return 2 if mode has been set;
|
||||
" return 3 if the specific mode doesn't exist;
|
||||
" return 0 if succeed.
|
||||
|
||||
" only set to the new mode if no mode is set before.
|
||||
if !empty(s:cur_mode)
|
||||
return 2
|
||||
endif
|
||||
|
||||
" set function refs to dict
|
||||
if a:mode ==? 'auto'
|
||||
" autodetect for an appropriate mode
|
||||
|
||||
for l:one_mode in ['python']
|
||||
|
||||
let l:init_result = SingleCompileAsync#Initialize(l:one_mode)
|
||||
if type(l:init_result) == type(0) && l:init_result == 0
|
||||
return 0
|
||||
endif
|
||||
endfor
|
||||
|
||||
return 0
|
||||
|
||||
elseif a:mode ==? 'python'
|
||||
let s:mode_dict['Initialize'] = function('s:InitializePython')
|
||||
let s:mode_dict['IsRunning'] = function('s:IsRunningPython')
|
||||
let s:mode_dict['Run'] = function('s:RunPython')
|
||||
let s:mode_dict['Terminate'] = function('s:TerminatePython')
|
||||
let s:mode_dict['GetOutput'] = function('s:GetOutputPython')
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
|
||||
" call the initialization function
|
||||
let l:init_result = s:mode_dict['Initialize']()
|
||||
|
||||
if type(l:init_result) == type('') ||
|
||||
\ (type(l:init_result) == type(0) && l:init_result != 0)
|
||||
return l:init_result
|
||||
endif
|
||||
|
||||
let s:cur_mode = a:mode
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#IsRunning() " {{{1
|
||||
" check is there a process running in background.
|
||||
" Return 1 means there is a process running in background,
|
||||
" return 0 means there is no process running in background,
|
||||
" return -1 if mode hasn't been set,
|
||||
" return other values if failed to check whether the process is running.
|
||||
|
||||
if empty(s:cur_mode)
|
||||
return 0
|
||||
endif
|
||||
|
||||
return s:mode_dict['IsRunning']()
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#Run(run_command) " {{{1
|
||||
" run a new command.
|
||||
" Return -1 if mode hasn't been set;
|
||||
" return 1 if a process is running in background;
|
||||
" return 0 means the command is run successfully;
|
||||
" return other values means the command is not run successfully.
|
||||
|
||||
if empty(s:cur_mode)
|
||||
return -1
|
||||
endif
|
||||
|
||||
if SingleCompileAsync#IsRunning() == 1
|
||||
return 1
|
||||
endif
|
||||
|
||||
return s:mode_dict['Run'](a:run_command)
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#Terminate() " {{{1
|
||||
" terminate current background process
|
||||
|
||||
" Return -1 if mode hasn't been set;
|
||||
" return 1 if no process is running in background;
|
||||
" return 0 means terminating the process successfully;
|
||||
" return other values means failed to terminate.
|
||||
|
||||
if empty(s:cur_mode)
|
||||
return -1
|
||||
endif
|
||||
|
||||
if SingleCompileAsync#IsRunning() == 0
|
||||
return 1
|
||||
endif
|
||||
|
||||
return s:mode_dict['Terminate']()
|
||||
endfunction
|
||||
|
||||
function! SingleCompileAsync#GetOutput() " {{{1
|
||||
" get the output of the process.
|
||||
" Return -1 if mode hasn't been set;
|
||||
" return 1 if a process is running in background;
|
||||
" return other integer values if failed to get the output;
|
||||
" return a list if the output is successfully gained.
|
||||
|
||||
if empty(s:cur_mode)
|
||||
return -1
|
||||
endif
|
||||
|
||||
if SingleCompileAsync#IsRunning() == 1
|
||||
return 1
|
||||
endif
|
||||
|
||||
return s:mode_dict['GetOutput']()
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
let &cpo = s:saved_cpo
|
||||
unlet! s:saved_cpo
|
||||
|
||||
" vim703: cc=78
|
||||
" vim: fdm=marker et ts=4 tw=78 sw=4 fdc=3
|
Reference in New Issue
Block a user