1
0
forked from aniani/vim

Update runtime files

This commit is contained in:
Bram Moolenaar
2022-10-16 13:11:12 +01:00
parent bd053f894b
commit 3c053a1a5a
40 changed files with 653 additions and 223 deletions

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Abaqus finite element input file (www.abaqus.com)
" Maintainer: Carl Osterwisch <costerwi@gmail.com>
" Last Change: 2022 Aug 03
" Last Change: 2022 Oct 08
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -66,25 +66,44 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if !exists("no_plugin_maps") && !exists("no_abaqus_maps")
" Define keys used to move [count] keywords backward or forward.
noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR>
noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR>
" Map [[ and ]] keys to move [count] keywords backward or forward
nnoremap <silent><buffer> ]] :call <SID>Abaqus_NextKeyword(1)<CR>
nnoremap <silent><buffer> [[ :call <SID>Abaqus_NextKeyword(-1)<CR>
function! <SID>Abaqus_NextKeyword(direction)
.mark '
if a:direction < 0
let flags = 'b'
else
let flags = ''
endif
let l:count = abs(a:direction) * v:count1
while l:count > 0 && search("^\\*\\a", flags)
let l:count -= 1
endwhile
endfunction
" Define key to toggle commenting of the current line or range
" Map \\ to toggle commenting of the current line or range
noremap <silent><buffer> <LocalLeader><LocalLeader>
\ :call <SID>Abaqus_ToggleComment()<CR>j
function! <SID>Abaqus_ToggleComment() range
if strpart(getline(a:firstline), 0, 2) == "**"
" Un-comment all lines in range
silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
else
" Comment all lines in range
silent execute a:firstline . ',' . a:lastline . 's/^/**/'
endif
if strpart(getline(a:firstline), 0, 2) == "**"
" Un-comment all lines in range
silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
else
" Comment all lines in range
silent execute a:firstline . ',' . a:lastline . 's/^/**/'
endif
endfunction
" Map \s to swap first two comma separated fields
noremap <silent><buffer> <LocalLeader>s :call <SID>Abaqus_Swap()<CR>
function! <SID>Abaqus_Swap() range
silent execute a:firstline . ',' . a:lastline . 's/\([^*,]*\),\([^,]*\)/\2,\1/'
endfunction
let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
\ . "|unmap <buffer> <LocalLeader><LocalLeader>"
\ . "|unmap <buffer> <LocalLeader>s"
endif
" Undo must be done in nocompatible mode for <LocalLeader>.

View File

@@ -3,7 +3,8 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
" Contributor: Dorai Sitaram <ds26@gte.com>
" Last Change: 2022 Sep 05
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
" Last Change: 2022 Oct 15
if exists("b:did_ftplugin")
finish
@@ -19,9 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
let &l:define = '\<function\|\<local\%(\s\+function\)\='
" TODO: handle init.lua
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal suffixesadd=.lua
let b:undo_ftplugin = "setlocal cms< com< def< fo< sua<"
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05
" Language: Markdown
" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
" Last Change: 2022 Oct 13
if exists("b:did_ftplugin")
finish
@@ -9,18 +9,33 @@ endif
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
let s:keepcpo= &cpo
set cpo&vim
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=<!--%s-->
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
else
let b:undo_ftplugin = "setl cms< com< fo< flp<"
let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
endif
if get(g:, 'markdown_recommended_style', 1)
setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
endif
if !exists("g:no_plugin_maps") && !exists("g:no_markdown_maps")
nnoremap <silent><buffer> [[ :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
nnoremap <silent><buffer> ]] :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
xnoremap <silent><buffer> [[ :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
xnoremap <silent><buffer> ]] :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
let b:undo_ftplugin .= '|sil! nunmap <buffer> [[|sil! nunmap <buffer> ]]|sil! xunmap <buffer> [[|sil! xunmap <buffer> ]]'
endif
function! s:NotCodeBlock(lnum) abort
return synIDattr(synID(v:lnum, 1, 1), 'name') !=# 'markdownCode'
return synIDattr(synID(a:lnum, 1, 1), 'name') !=# 'markdownCode'
endfunction
function! MarkdownFold() abort
@@ -64,11 +79,14 @@ function! MarkdownFoldText() abort
return hash_indent.' '.title.' '.linecount
endfunction
if has("folding") && exists("g:markdown_folding")
if has("folding") && get(g:, "markdown_folding", 0)
setlocal foldexpr=MarkdownFold()
setlocal foldmethod=expr
setlocal foldtext=MarkdownFoldText()
let b:undo_ftplugin .= " foldexpr< foldmethod< foldtext<"
let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
endif
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:set sw=2:

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: PoE item filter
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Oct 07
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s
let b:undo_ftplugin = 'setl com< cms<'

13
runtime/ftplugin/ssa.vim Normal file
View File

@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: SubStation Alpha
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2022 Oct 10
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=:;,:!: commentstring=;\ %s
let b:undo_ftplugin = 'setl com< cms<'