annotate runtime/indent/python.vim @ 30457:7ab65e398be7 v9.0.0564

patch 9.0.0564: a few tests keep failing on MacOS M1 Commit: https://github.com/vim/vim/commit/0056ca71374feadf6bad27f5b66eaa18b6f7dad7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 23 21:26:39 2022 +0100 patch 9.0.0564: a few tests keep failing on MacOS M1 Problem: A few tests keep failing on MacOS M1. Solution: Add a test check CheckNotMacM1. Fix timer tests.
author Bram Moolenaar <Bram@vim.org>
date Fri, 23 Sep 2022 22:30:02 +0200
parents 67f31c24291b
children 4027cefc2aab
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 indent file
164
8b0ee9d57d7f updated for version 7.0050
vimboss
parents: 20
diff changeset
2 " Language: Python
8b0ee9d57d7f updated for version 7.0050
vimboss
parents: 20
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Original Author: David Bustos <bustos@caltech.edu>
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24751
diff changeset
5 " Last Change: 2021 Sep 26
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Only load this indent file when no other was loaded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if exists("b:did_indent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 let b:did_indent = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Some preliminary settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 setlocal nolisp " Make sure lisp indenting doesn't supersede us
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal autoindent " indentexpr isn't much help otherwise
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
29450
67f31c24291b Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
17 setlocal indentexpr=python#GetIndent(v:lnum)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 setlocal indentkeys+=<:>,=elif,=except
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24751
diff changeset
20 let b:undo_indent = "setl ai< inde< indk< lisp<"
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24751
diff changeset
21
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Only define the function once.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if exists("*GetPythonIndent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
29450
67f31c24291b Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
27 " Keep this for backward compatibility, new scripts should use
67f31c24291b Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
28 " python#GetIndent()
67f31c24291b Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
29 function GetPythonIndent(lnum)
67f31c24291b Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
30 return python#GetIndent(a:lnum)
20379
7f88f6a3ed4c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 15932
diff changeset
31 endfunction
7f88f6a3ed4c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 15932
diff changeset
32
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " vim:sw=2