robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
cbf54ec2a5
master
1" Vim indent file 2" Language: Python 3" Maintainer: The Vim Project <https://github.com/vim/vim> 4" Last Change: 2023 Aug 10 5" 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" ) 10finish 11endif 12let b: did_indent = 1 13 14" Some preliminary settings 15setlocal nolisp " Make sure lisp indenting doesn't supersede us 16setlocal autoindent " indentexpr isn't much help otherwise 17 18setlocal indentexpr = python #GetIndent(v:lnum) 19setlocal indentkeys += <:>,=elif,=except 20 21let b: undo_indent = "setl ai< inde< indk< lisp<" 22 23" Only define the function once. 24if exists ( "*GetPythonIndent" ) 25finish 26endif 27 28" Keep this for backward compatibility, new scripts should use 29" python#GetIndent() 30function GetPythonIndent ( lnum ) 31return python#GetIndent ( a: lnum ) 32endfunction 33 34" vim:sw=2