annotate runtime/ftplugin/python.vim @ 15222:c4a379734f18

Added tag v8.1.0620 for changeset 516a9833c5cdb8120abccf6ce77b0aa15bab4f0b
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Dec 2018 15:00:08 +0100
parents a62eeee5f116
children bd7461db24b3
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
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
3 " Maintainer: Tom Picton <tom@tompicton.co.uk>
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
4 " Previous Maintainer: James Sully <sullyj3@gmail.com>
9286
64035abb986b commit https://github.com/vim/vim/commit/c95a302a4c42ec8230473cd4a5e0064d0a143aa8
Christian Brabandt <cb@256bit.org>
parents: 5663
diff changeset
5 " Previous Maintainer: Johannes Zellner <johannes@zellner.org>
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
6 " Last Change: Sun, 15 April 2018
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
7 " https://github.com/tpict/vim-ftplugin-python
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
11 let s:keepcpo= &cpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
12 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 setlocal cinkeys-=0#
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal indentkeys-=0#
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
16 setlocal include=^\\s*\\(from\\\|import\\)
13482
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
17
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
18 " For imports with leading .., append / and replace additional .s with ../
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
19 let b:grandparent_match = '^\(.\.\)\(\.*\)'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
20 let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
21
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
22 " For imports with a single leading ., replace it with ./
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
23 let b:parent_match = '^\.\(\.\)\@!'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
24 let b:parent_sub = './'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
25
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
26 " Replace any . sandwiched between word characters with /
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
27 let b:child_match = '\(\w\)\.\(\w\)'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
28 let b:child_sub = '\1/\2'
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
29
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
30 setlocal includeexpr=substitute(substitute(substitute(
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
31 \v:fname,
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
32 \b:grandparent_match,b:grandparent_sub,''),
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
33 \b:parent_match,b:parent_sub,''),
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
34 \b:child_match,b:child_sub,'g')
9eebe457eb3c Update runtime files. Convert a couple of help files to utf-8.
Christian Brabandt <cb@256bit.org>
parents: 13125
diff changeset
35
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 setlocal suffixesadd=.py
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
37 setlocal comments=b:#,fb:-
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
38 setlocal commentstring=#\ %s
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 626
diff changeset
40 setlocal omnifunc=pythoncomplete#Complete
13125
371ceeebbdaa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
41 if has('python3')
371ceeebbdaa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
42 setlocal omnifunc=python3complete#Complete
371ceeebbdaa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
43 endif
626
732c7ae5743e updated for version 7.0180
vimboss
parents: 7
diff changeset
44
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 set wildignore+=*.pyc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
10261
bdd7fc1a38c0 commit https://github.com/vim/vim/commit/dc08328821a2c11e33dfb1980332e4923ec64fca
Christian Brabandt <cb@256bit.org>
parents: 10153
diff changeset
47 let b:next_toplevel='\v%$\|^(class\|def\|async def)>'
bdd7fc1a38c0 commit https://github.com/vim/vim/commit/dc08328821a2c11e33dfb1980332e4923ec64fca
Christian Brabandt <cb@256bit.org>
parents: 10153
diff changeset
48 let b:prev_toplevel='\v^(class\|def\|async def)>'
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
49 let b:next_endtoplevel='\v%$\|\S.*\n+(def\|class)'
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
50 let b:prev_endtoplevel='\v\S.*\n+(def\|class)'
10261
bdd7fc1a38c0 commit https://github.com/vim/vim/commit/dc08328821a2c11e33dfb1980332e4923ec64fca
Christian Brabandt <cb@256bit.org>
parents: 10153
diff changeset
51 let b:next='\v%$\|^\s*(class\|def\|async def)>'
bdd7fc1a38c0 commit https://github.com/vim/vim/commit/dc08328821a2c11e33dfb1980332e4923ec64fca
Christian Brabandt <cb@256bit.org>
parents: 10153
diff changeset
52 let b:prev='\v^\s*(class\|def\|async def)>'
12826
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
53 let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)'
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
54 let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)'
10153
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
55
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
56 execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
57 execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
58 execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
59 execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
60 execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
61 execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
62 execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
63 execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
64
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
65 execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
66 execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
67 execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
68 execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
69 execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
70 execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
71 execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
72 execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
10153
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
73
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
74 execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
75 execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
76 execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
77 execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
78 execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
79 execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb', v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
80 execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0, v:count1)<cr>"
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
81 execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
83 if !exists('*<SID>Python_jump')
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
84 fun! <SID>Python_jump(mode, motion, flags, count, ...) range
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
85 let l:startofline = (a:0 >= 1) ? a:1 : 1
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
86
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
87 if a:mode == 'x'
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
88 normal! gv
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
89 endif
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
90
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
91 if l:startofline == 1
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
92 normal! 0
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
93 endif
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
94
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13482
diff changeset
95 let cnt = a:count
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
96 mark '
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
97 while cnt > 0
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
98 call search(a:motion, a:flags)
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
99 let cnt = cnt - 1
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
100 endwhile
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
101
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
102 if l:startofline == 1
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
103 normal! ^
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 10261
diff changeset
104 endif
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
105 endfun
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
106 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
5510
d7d7bac1a163 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5400
diff changeset
108 if has("browsefilter") && !exists("b:browsefilter")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 let b:browsefilter = "Python Files (*.py)\t*.py\n" .
9407
619a98a67f67 commit https://github.com/vim/vim/commit/e18dbe865d190e74fb5d43ac8bc6ac22507d0223
Christian Brabandt <cb@256bit.org>
parents: 9286
diff changeset
110 \ "All Files (*.*)\t*.*\n"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 endif
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
112
10153
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
113 if !exists("g:python_recommended_style") || g:python_recommended_style != 0
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
114 " As suggested by PEP8.
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
115 setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
715d6c5707b8 commit https://github.com/vim/vim/commit/abd468ed0fbcba391e7833feeaa7de3ced841455
Christian Brabandt <cb@256bit.org>
parents: 10140
diff changeset
116 endif
5400
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
117
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
118 " First time: try finding "pydoc".
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
119 if !exists('g:pydoc_executable')
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
120 if executable('pydoc')
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
121 let g:pydoc_executable = 1
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
122 else
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
123 let g:pydoc_executable = 0
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
124 endif
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
125 endif
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
126 " If "pydoc" was found use it for keywordprg.
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
127 if g:pydoc_executable
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
128 setlocal keywordprg=pydoc
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
129 endif
173c9c860e42 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 3496
diff changeset
130
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
131 let &cpo = s:keepcpo
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 827
diff changeset
132 unlet s:keepcpo