You are not logged in.
How do i enable python code completion in vim and if possible support for django. What command do I have to place in my vimrc and in which line.
Offline
First google result: UsingVimWithDjango.
Offline
Following my .vimrc file entry but the colorscheme set in the file doesn't apply in gvim:
colorscheme desert
set nocompatible
syntax on
" Omni Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
" Python tab settings
set ai
set ts=4
set sts=4
set et
set sw=4
Offline
Phrakture wrote the python omni complete vim plugin. You may want to check that out.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
But i am not asking about the omni complete, I am asking about colorscheme not applying. I am sorry I should have started a new thread.
Following is my vimrc file contents:
colorscheme desert
set nocompatible
syntax on
" Omni Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
" Python tab settings
set ai
set ts=4
set sts=4
set et
set sw=4
Offline
gvim uses .gvimrc, could it be this simple? Or possibly desert is not a gvim color scheme.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Gvim has desert in its color scheme list,<colorscheme desert> the is not even working in terminal with vim, i have googled it up and the option seems to be correct.
Offline
You don't actually need those omnifunc settings - they should be set automatically in the /usr/share scripts.
Does C-x,C-o do anything for you?
Offline
yes the C-x and C-o shortcuts works. So do i need these omni setting in my .vimrc. Is there a command to check whether these omni modules are active or not
Last edited by jaideep_jdof (2008-12-03 05:34:52)
Offline
Offline
I found out that gvim uses .gvimrc for configuation so do i have to place all the entries from my .vimrc to .gvimrc
Offline
just "ln -s ~/.vimrc ~/.gvimrc"
Offline
My gvim uses the options from .vimrc correctly without a .gvimrc!
Offline
Use :scriptnames in vim and gvim to see that vim uses only .vimrc, and gvim sources both. Use .gvimrc only for gvim-specific options.
Offline
Thanks all of you for the inputs
Offline