syntax on
set ignorecase
set incsearch
set tabstop=4
set autoindent
set number
set nowrap
set nocompatible
set ruler
set expandtab
set shiftwidth=4
filetype plugin indent on
autocmd FileType xhtml,html setlocal tabstop=2 shiftwidth=2 expandtab
autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab omnifunc=pythoncomplete#Complete
"autocmd FileType python source ~/.vim/after/ftplugin/python/ipy.vim
set complete=""
set complete+=.
set complete+=k
set complete+=b
set complete+=t
set completeopt-=preview
set completeopt+=longest
autocmd FileType python set complete+=k/home/xa4a/.vim/pydiction-0.5/pydiction isk+=.,(
setlocal keywordprg=pydoc
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
au FileType python source /home/xa4a/.vim/scripts/pycheck.vim
"au FileType python source /home/xa4a/.vim/scripts/python_import.vim
"source /home/xa4a/.vim/scripts/svn.vim
" ropevim
au FileType python source /usr/src/ropevim/ropevim.vim
au FileType python let w:m2=matchadd('ErrorMsg','\%81v.*',-1)
let ropevim_vim_completion=1
nmap <C-n> :cn<CR>
imap <C-n> <Esc>:cn<CR>
nmap <F9> <Plug>ToggleProject
"source /home/xa4a/.vim/plugin/project.vim
"au FileType python source /home/xa4a/.vim/scripts/python.vim
"au FileType python source /home/xa4a/.vim/scripts/tabcompl.vim
set t_Co=256
colorscheme 256_adaryn
hi Normal ctermbg=17
set cursorline
"22 for nice green line
hi CursorLine ctermbg=235 cterm=none
hi Pmenu ctermbg=239
nmap <F2> :w<cr>
map <C-s> <Esc>:w<CR>
map <F8> <Esc>:TlistToggle<cr>
iabbrev coding # -*- coding: utf-8 -*-
iabbrev pdb import pdb;pdb.set_trace()
" Make the tab key useful {{{
function! TabWrapper()
if strpart(getline('.'), 0, col('.')-1) =~ '^\s*$'
return "\<Tab>"
elseif exists('&omnifunc') && &omnifunc != ''
"return "\<C-X>\<C-N>"
return "\<C-X>\<C-o>\<C-p>"
else
return "\<C-N>"
endif
endfunction
function! TabWrapperRope()
if strpart(getline('.'), 0, col('.')-1) =~ '^\s*$'
return "\<Tab>"
else
return "\<C-R>=RopeCodeAssistInsertMode()\<CR>"
endif
endfunction
imap <Tab> <C-R>=TabWrapperRope()<CR>
"imap <Tab> <C-R>=TabWrapper()<CR>
"imap <S-Tab> <C-X><C-P>
"imap <C-Tab> <C-X><C-O>
let ScreenShot = {'Icon':0, 'Credits':0, 'Title':0}
python << EOF
import os
import sys
import vim
for p in sys.path:
if os.path.isdir(p):
vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF
map! <C-Tab> <C-R>:tabNext<CR>
map! <C-S-Tab> <C-R>:tabprevious<CR>
map <C-t> <Esc>:tabe
set tags+=$HOME/.vim/tags/python.ctags
map <C-e> <Esc>:tabclose<CR>