Hello,
I installed vim and the plugins according to this page : VIM as Python IDE | Alain M. Lafon
But nothing has changed.
What went wrong ?
Roelof
Hello,
I installed vim and the plugins according to this page : VIM as Python IDE | Alain M. Lafon
But nothing has changed.
What went wrong ?
Roelof
nobody who knows the answer ?
You’re not exactly helping your self as it happens I have tried it works so I’m not sure what the problem is.
Following that tut the only thing that isn’t working is vimpdb the last tut I found about vim as python ide iirc used vim bindings to place in a break statement if needed.
The tut is a little dated unless I’m mistaken but I did have a little lapse at how to get omin-complete working the plugin isn’t needed(I don’t think so anyway I’ve removed it and still completes)(ctrl-x, ctrl-o). The mini buffer explorer works, the taglist works(Again with my system ctags iirc most distros use exuberant-ctags any way).
vim is a beast for the uninitiated I would probably suggest trying eric see if that is easier to get on with, then come back to vim/gvim.
The lack of details is probably why you’ve not had better assistance you rarely can give too much info i.e your vimrc/gvimrc, the command you’re using to start, if any output(How I found out about bad eol in the vimpdb plugin) etc…etc…
To test…
esc :TlistToggle
For the MiniBufExplorer you just need more than one file open so open another.
For the omni-complete simple example
import sys
sys.
Now press ctrl x ctrl o and it’ll omni-complete.
As for pdb not sure what to suggest after eric but this has a couple of functions you could add to your vimrc to enable f7 to add a breakpoint. http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/
Oke,
My vimrc looks like this :
" ~/.vimrc (configuration file for vim only)
" skeletons
function! SKEL_spec()
0r /usr/share/vim/current/skeletons/skeleton.spec
language time en_US
if $USER != ‘’
let login = $USER
elseif $LOGNAME != ‘’
let login = $LOGNAME
else
let login = ‘unknown’
endif
let newline = stridx(login, "
“)
if newline != -1
let login = strpart(login, 0, newline)
endif
if $HOSTNAME != ‘’
let hostname = $HOSTNAME
else
let hostname = system(‘hostname -f’)
if v:shell_error
let hostname = ‘localhost’
endif
endif
let newline = stridx(hostname, "
“)
if newline != -1
let hostname = strpart(hostname, 0, newline)
endif
exe “%s/specRPM_CREATION_DATE/” . strftime(”%a\ %b\ %d\ %Y”) . “/ge”
exe “%s/specRPM_CREATION_AUTHOR_MAIL/” . login . “@” . hostname . “/ge”
exe “%s/specRPM_CREATION_NAME/” . expand("%:t:r") . “/ge”
setf spec
endfunction
autocmd BufNewFile *.spec call SKEL_spec()
" filetypes
filetype plugin on
filetype indent on
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let Tlist_Ctags_Cmd=’/usr/local/bin/ctags’
map T :TaskList<CR>
map P :TlistToggle<CR>
autocmd FileType python set omnifunc=pythoncomplete#Complete
set expandtab
set textwidth=79
set tabstop=8
set softtabstop=4
set shiftwidth=4
set autoindent
:syntax on
" ~/.vimrc ends here
I don't know vim but everyone says it's one of the best python ide
Roelof
The first thing I notice is unless you’ve put ctags there then the path is highly unlikely. Have you checked to see if vim has python built-in I presume so but my testing has been done on another distro for the tut. As my suse testing is far from a default install in fact doesn’t even have a gui.
Are you not getting any output when starting from the cli? i.e vimpdb bailing out have you fixed the eol’s(Not that will actually help any way, it’ll then crash vim when debugging).
Honestly I’m tiring of extracting the information vim is not soo much a good python IDE but a versatile text editor than “can” be made in to a very good programming IDE. But you have to do the leg work come back with things that are actually solvable as far as I know with a little common sense and following that tut most bits do work. i.e using the ctag path that is installed and not following along blindly. Track down errors and encounter errors rather than it doesn’t work.
Simply put rather than writing all the above I could say works for me and post my vimrc, beyond the fact I started with a vanilla vimrc and have expanded it, really the only bits I have that are relevant to the tut are.
filetype plugin on
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let Tlist_Ctags_Cmd='/path/to/ctags'
Already had
filetype on
filetype detect
set nu
syntax on
set tabstop=4
set shiftwidth=4
set autoindent