diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-04-11 18:49:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-11 18:49:10 +0800 |
| commit | 4459e0cee8b6d043ab2b06cbd89545c45a76a612 (patch) | |
| tree | 9b10c41429f7f51ed5c46ea570538f0e127f5f3a /runtime/indent | |
| parent | 1746b9234c2d38ff7db98eb8c71f1fa5e8d47616 (diff) | |
| parent | 55ffca2f9f8317a5e3ab6e625fcb02e8bcd5dbcf (diff) | |
| download | rneovim-4459e0cee8b6d043ab2b06cbd89545c45a76a612.tar.gz rneovim-4459e0cee8b6d043ab2b06cbd89545c45a76a612.tar.bz2 rneovim-4459e0cee8b6d043ab2b06cbd89545c45a76a612.zip | |
Merge pull request #28277 from zeertzjq/vim-556c62165963
vim-patch: runtime file updates
Diffstat (limited to 'runtime/indent')
| -rw-r--r-- | runtime/indent/asm.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/runtime/indent/asm.vim b/runtime/indent/asm.vim new file mode 100644 index 0000000000..7f848c7b5f --- /dev/null +++ b/runtime/indent/asm.vim @@ -0,0 +1,28 @@ +" Vim indent file +" Language: asm +" Maintainer: Philip Jones <philj56@gmail.com> +" Upstream: https://github.com/philj56/vim-asm-indent +" Latest Revision: 2017-07-01 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=s:getAsmIndent() +setlocal indentkeys=<:>,!^F,o,O + +let b:undo_ftplugin .= "indentexpr< indentkeys<" + +function! s:getAsmIndent() + let line = getline(v:lnum) + let ind = shiftwidth() + + " If the line is a label (starts with ':' terminated keyword), + " then don't indent + if line =~ '^\s*\k\+:' + let ind = 0 + endif + + return ind +endfunction |