Files
neovim/runtime/indent/python.vim
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
886 B
VimL
Raw Normal View History

2014-07-11 04:05:51 +00:00
" Vim indent file
2023-08-13 13:25:10 +01:00
" Language: Python
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
2014-07-11 04:05:51 +00:00
" Original Author: David Bustos <bustos@caltech.edu>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" Some preliminary settings
setlocal nolisp " Make sure lisp indenting doesn't supersede us
setlocal autoindent " indentexpr isn't much help otherwise
2022-07-26 11:26:23 +02:00
setlocal indentexpr=python#GetIndent(v:lnum)
2014-07-11 04:05:51 +00:00
setlocal indentkeys+=<:>,=elif,=except
2021-10-05 14:12:16 +02:00
let b:undo_indent = "setl ai< inde< indk< lisp<"
2014-07-11 04:05:51 +00:00
" Only define the function once.
if exists("*GetPythonIndent")
finish
endif
2021-04-28 01:33:17 -04:00
2022-07-26 11:26:23 +02:00
" Keep this for backward compatibility, new scripts should use
" python#GetIndent()
2014-07-11 04:05:51 +00:00
function GetPythonIndent(lnum)
2022-07-26 11:26:23 +02:00
return python#GetIndent(a:lnum)
2014-07-11 04:05:51 +00:00
endfunction
" vim:sw=2