Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: python | |
3 " Maintainer: Johannes Zellner <johannes@zellner.org> | |
4 " Last Change: Wed, 21 Apr 2004 13:13:08 CEST | |
5 | |
6 if exists("b:did_ftplugin") | finish | endif | |
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 | 10 |
11 setlocal cinkeys-=0# | |
12 setlocal indentkeys-=0# | |
13 setlocal include=\s*\\(from\\\|import\\) | |
14 setlocal includeexpr=substitute(v:fname,'\\.','/','g') | |
15 setlocal suffixesadd=.py | |
16 setlocal comments-=:% | |
17 setlocal commentstring=#%s | |
18 | |
827 | 19 setlocal omnifunc=pythoncomplete#Complete |
626 | 20 |
7 | 21 set wildignore+=*.pyc |
22 | |
23 nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr> | |
24 nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)')<cr> | |
25 nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)')<cr> | |
26 nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)')<cr> | |
27 | |
28 if exists('*<SID>Python_jump') | finish | endif | |
29 | |
30 fun! <SID>Python_jump(motion) range | |
31 let cnt = v:count1 | |
32 let save = @/ " save last search pattern | |
33 mark ' | |
34 while cnt > 0 | |
35 silent! exe a:motion | |
36 let cnt = cnt - 1 | |
37 endwhile | |
38 call histdel('/', -1) | |
39 let @/ = save " restore last search pattern | |
40 endfun | |
41 | |
42 if has("gui_win32") && !exists("b:browsefilter") | |
43 let b:browsefilter = "Python Files (*.py)\t*.py\n" . | |
44 \ "All Files (*.*)\t*.*\n" | |
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 |