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

View File

@ -930,7 +930,7 @@ endfunction
" options for DirDiff " options for DirDiff
let g:DirDiffCommand = expand($VIMRUNTIME . '/diff') 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 "let g:DirDiffDynamicDiffText = 1
" options for Vimball " options for Vimball

View File

@ -186,6 +186,17 @@ if exists('g:debug')
endif endif
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 " DoxygenToolkit
" -------------- " --------------

View File

@ -1,6 +1,6 @@
let g:Austausch = expand('//easerv.muc/Organisation/ea-41/Austausch') let g:Austausch = expand('//easerv.muc/Organisation/ea-41/Austausch')
let g:myAustausch = expand(g:Austausch . '/Liebl') let g:myAustausch = expand(g:Austausch . '/Liebl')
let g:bmskWA = expand('d:/wa') let g:bmskWA = expand('c:/wa')
let g:WA = expand('d:/wa') let g:WA = expand('c:/wa')
let g:ccm = expand('c:/ec-apps/cmsynergy/ccm64/bin/ccm.exe') 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:swapdir = expand($TEMP . '/vi')
let g:gvim = expand($VIMRUNTIME . '/gvim.exe ') 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:diff = expand($VIMRUNTIME . '/diff ')
let g:svn = expand('svn ') let g:svn = expand('svn ')
let g:cvs = expand('cvs ') let g:cvs = expand('cvs ')