annotate runtime/ftplugin/python.vim @ 5124:6f24376028af v7.3.1305

updated for version 7.3.1305 Problem: Warnings from 64 bit compiler. Solution: Add type casts.
author Bram Moolenaar <bram@vim.org>
date Thu, 04 Jul 2013 21:19:33 +0200
parents d1e4abe8342c
children 173c9c860e42
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: python
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Johannes Zellner <johannes@zellner.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Wed, 21 Apr 2004 13:13:08 CEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 let b:did_ftplugin = 1
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
8 let s:keepcpo= &cpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
9 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 setlocal cinkeys-=0#
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 setlocal indentkeys-=0#
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 setlocal include=\s*\\(from\\\|import\\)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 setlocal includeexpr=substitute(v:fname,'\\.','/','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal suffixesadd=.py
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 setlocal comments-=:%
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 setlocal commentstring=#%s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 626
diff changeset
19 setlocal omnifunc=pythoncomplete#Complete
626
732c7ae5743e updated for version 7.0180
vimboss
parents: 7
diff changeset
20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 set wildignore+=*.pyc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)')<cr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if exists('*<SID>Python_jump') | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 fun! <SID>Python_jump(motion) range
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 let cnt = v:count1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 let save = @/ " save last search pattern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 mark '
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 while cnt > 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 silent! exe a:motion
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 let cnt = cnt - 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endwhile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 call histdel('/', -1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 let @/ = save " restore last search pattern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if has("gui_win32") && !exists("b:browsefilter")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let b:browsefilter = "Python Files (*.py)\t*.py\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 \ "All Files (*.*)\t*.*\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 endif
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
46
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
47 let &cpo = s:keepcpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
48 unlet s:keepcpo