codekingpro/portable-devtools
114k
1" Vim indent file2" Language: Python3" Maintainer: The Vim Project <https://github.com/vim/vim>4" Last Change: 2023 Aug 105" Former Maintainer: Bram Moolenaar <Bram@vim.org>6" Original Author: David Bustos <bustos@caltech.edu>7 8" Only load this indent file when no other was loaded.9if exists("b:did_indent")10 finish11endif12let b:did_indent = 113 14" Some preliminary settings15setlocal nolisp " Make sure lisp indenting doesn't supersede us16setlocal autoindent " indentexpr isn't much help otherwise17 18setlocal indentexpr=python#GetIndent(v:lnum)19setlocal indentkeys+=<:>,=elif,=except20 21let b:undo_indent = "setl ai< inde< indk< lisp<"22 23" Only define the function once.24if exists("*GetPythonIndent")25 finish26endif27 28" Keep this for backward compatibility, new scripts should use29" python#GetIndent()30function GetPythonIndent(lnum)31 return python#GetIndent(a:lnum)32endfunction33 34" vim:sw=235 