Bugfix python

DirDiff, Completion

git-svn-id: https://vimsuite.svn.sourceforge.net/svnroot/vimsuite/trunk@211 eb2d0018-73a3-4aeb-bfe9-1def61c9ec69
This commit is contained in:
AlterDepp 2011-09-26 13:42:46 +00:00
parent a6695622e6
commit 4eea06e04a
5 changed files with 61 additions and 62 deletions

View File

@ -8,70 +8,58 @@ if !has('win32')
finish
endif
if !has('python')
" noch keine python.dll gefunden
" tools zum Suchpfad hinzufügen
if (match($PATH, '\c' . escape(g:vimtools, '\')) >= 0)
" ist schon drin, abbrechen
echo 'keine python.dll in g:vimtools=' . g:vimtools . ' gefunden'
finish
else
" bei Bedarf ';' an PATH anhängen
if (match($PATH, ';$') < 0)
let $PATH = $PATH . ';'
endif
let $PATH = $PATH . g:vimtools . ';'
"echo 'Python = ' . g:vimtools
endif
endif
if !has('python')
" immer noch keine python.dll gefunden
if exists('g:pythonPath')
if !has('python')
" keine python.dll gefunden
if !isdirectory(g:pythonPath)
echo 'g:pythonPath=' . g:pythonPath . ' nicht gefunden'
finish
else
" pythonPath zum Suchpfad hinzufügen
if (match($PATH, '\c' . escape(g:pythonPath, '\')) >= 0)
let PATH = $PATH
if (match(PATH, '\c' . escape(g:pythonPath, '\')) >= 0)
" ist schon drin, abbrechen
echo 'kein python.exe in g:pythonPath=' . g:pythonPath . ' gefunden'
finish
else
" bei Bedarf ';' an PATH anhängen
if (match($PATH, ';$') < 0)
let $PATH = $PATH . ';'
if (match(PATH, ';$') < 0)
let PATH = PATH . ';'
endif
let $PATH = $PATH . g:pythonPath . ';'
let PATH = PATH . g:pythonPath
"echo 'Python = ' . g:pythonPath
"echo 'PATH:' PATH
let $PATH = PATH
endif
endif
endif
endif
" Jetzt sollte es eigentlich gehen
if !has('python')
" Jetzt sollte es eigentlich gehen
if !has('python')
echoe 'kein Python-Modul für vim'
finish
endif
let s:pythonLibPath = expand(g:pythonPath . '/lib')
let s:pythonDllPath = expand(g:pythonPath . '/dlls')
endif
let s:pythonLibPath = expand(g:pythonPath . '/lib')
let s:pythonDllPath = expand(g:pythonPath . '/dlls')
try
python <<EOF
import sys
#print sys.version
import vim
sys.path.append(vim.eval('s:pythonLibPath'))
sys.path.append(vim.eval('s:pythonDllPath'))
EOF
catch /^Vim\%((\a\+)\)\=:E370/ " python not available
echo 'python not found'
echo 'add python to your path-variable'
echo 'otherwise some features from MyTools are not available'
catch /^Vim\%((\a\+)\)\=:E263/ " python not available
echo 'python not found 2'
catch
echo 'python.vim: irgendwas geht nicht'
endtry
"try
"python <<EOF
"import sys
"#print sys.version
"import vim
"sys.path.append(vim.eval('s:pythonLibPath'))
"sys.path.append(vim.eval('s:pythonDllPath'))
"EOF
"catch /^Vim\%((\a\+)\)\=:E370/ " python not available
" echo 'python not found'
" echo 'add python to your path-variable'
" echo 'otherwise some features from MyTools are not available'
"catch /^Vim\%((\a\+)\)\=:E263/ " python not available
" echo 'python not found 2'
"catch
" echo 'python.vim: irgendwas geht nicht'
"endtry
EchoDebug 'loaded python.vim'

View File

@ -930,7 +930,7 @@ endfunction
" options for DirDiff
let g:DirDiffCommand = expand($VIMRUNTIME . '/diff')
let g:DirDiffExcludes = '*.log,*.pyc,.svn,_ccmwaid.inf,.static_wa,out,tags,cscope.out'
let g:DirDiffExcludes = '*.log,*.pyc,.svn,.asc,_ccmwaid.inf,.static_wa,out,Build,tags,cscope.out'
"let g:DirDiffDynamicDiffText = 1
" options for Vimball

View File

@ -186,6 +186,17 @@ if exists('g:debug')
endif
endif
" ----------
" Completion
" ----------
set completeopt=longest,menuone
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" --------------
" DoxygenToolkit
" --------------

View File

@ -1,6 +1,6 @@
let g:Austausch = expand('//easerv.muc/Organisation/ea-41/Austausch')
let g:myAustausch = expand(g:Austausch . '/Liebl')
let g:bmskWA = expand('d:/wa')
let g:WA = expand('d:/wa')
let g:bmskWA = expand('c:/wa')
let g:WA = expand('c:/wa')
let g:ccm = expand('c:/ec-apps/cmsynergy/ccm64/bin/ccm.exe')

View File

@ -5,7 +5,7 @@ let g:backupdir = expand($TEMP . '/vi')
let g:swapdir = expand($TEMP . '/vi')
let g:gvim = expand($VIMRUNTIME . '/gvim.exe ')
let g:pythonPath = expand('d:/wa/tools/python/2.7.1')
"let g:pythonPath = expand('c:/wa/tools/python/2.7.1')
let g:diff = expand($VIMRUNTIME . '/diff ')
let g:svn = expand('svn ')
let g:cvs = expand('cvs ')