annotate runtime/ftplugin/abaqus.vim @ 36570:b9ea000fa602 draft default tip

runtime(doc): Makefile does not clean up all temporary files Commit: https://github.com/vim/vim/commit/deda23f850ae384706f3f071366e5849498e6a76 Author: Christian Brabandt <cb@256bit.org> Date: Sat Nov 16 12:47:06 2024 +0100 runtime(doc): Makefile does not clean up all temporary files Also remove (automatically generated) tags-* (made by make vimtags) and vim-stylesheet.css (which is produced by vim2html.pl). related: #16061 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Nov 2024 13:00:05 +0100
parents 7c7432a53a6c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Abaqus finite element input file (www.abaqus.com)
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
3 " Maintainer: Carl Osterwisch <costerwi@gmail.com>
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
4 " Last Change: 2022 Oct 08
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
5 " 2024 Jan 14 by Vim Project (browsefilter)
35324
7c7432a53a6c patch 9.1.0464: no whitespace padding in commentstring option in ftplugins
Christian Brabandt <cb@256bit.org>
parents: 34134
diff changeset
6 " 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Save the compatibility options and temporarily switch to vim defaults
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 let s:cpo_save = &cpoptions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 set cpoptions&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Set the format of the include file specification for Abaqus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Used in :check gf ^wf [i and other commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 setlocal include=\\<\\cINPUT\\s*=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Remove characters up to the first = when evaluating filenames
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 setlocal includeexpr=substitute(v:fname,'.\\{-}=','','')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
15
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
25 " Remove comma from valid filename characters since it is used to
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
26 " separate keyword parameters
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
27 setlocal isfname-=,
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Define format of comment lines (see 'formatoptions' for uses)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 setlocal comments=:**
35324
7c7432a53a6c patch 9.1.0464: no whitespace padding in commentstring option in ftplugins
Christian Brabandt <cb@256bit.org>
parents: 34134
diff changeset
31 setlocal commentstring=**\ %s
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Definitions start with a * and assign a NAME, NSET, or ELSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Used in [d ^wd and other commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Abaqus keywords and identifiers may include a - character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 setlocal iskeyword+=-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
40 let b:undo_ftplugin = "setlocal include< includeexpr< isfname<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
41 \ . " comments< commentstring< define< iskeyword<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
42
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
43 if has("folding")
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
44 " Fold all lines that do not begin with *
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
45 setlocal foldexpr=getline(v:lnum)[0]!=\"\*\"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
46 setlocal foldmethod=expr
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
47 let b:undo_ftplugin .= " foldexpr< foldmethod<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
48 endif
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
49
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Set the file browse filter (currently only supported under Win32 gui)
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
51 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 \ "Abaqus Results (*.dat)\t*.dat\n" .
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
54 \ "Abaqus Messages (*.pre, *.msg, *.sta)\t*.pre;*.msg;*.sta\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
55 if has("win32")
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
56 let b:browsefilter .= "All Files (*.*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
57 else
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
58 let b:browsefilter .= "All Files (*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 30875
diff changeset
59 endif
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
60 let b:undo_ftplugin .= "|unlet! b:browsefilter"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
63 " Define patterns for the matchit plugin
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
64 if exists("loaded_matchit") && !exists("b:match_words")
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
65 let b:match_ignorecase = 1
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
66 let b:match_words =
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
67 \ '\*part:\*end\s*part,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
68 \ '\*assembly:\*end\s*assembly,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
69 \ '\*instance:\*end\s*instance,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
70 \ '\*step:\*end\s*step'
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
71 let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words"
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
72 endif
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
73
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
74 if !exists("no_plugin_maps") && !exists("no_abaqus_maps")
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
75 " Map [[ and ]] keys to move [count] keywords backward or forward
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
76 nnoremap <silent><buffer> ]] :call <SID>Abaqus_NextKeyword(1)<CR>
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
77 nnoremap <silent><buffer> [[ :call <SID>Abaqus_NextKeyword(-1)<CR>
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
78 function! <SID>Abaqus_NextKeyword(direction)
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
79 .mark '
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
80 if a:direction < 0
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
81 let flags = 'b'
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
82 else
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
83 let flags = ''
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
84 endif
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
85 let l:count = abs(a:direction) * v:count1
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
86 while l:count > 0 && search("^\\*\\a", flags)
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
87 let l:count -= 1
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
88 endwhile
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
89 endfunction
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
91 " Map \\ to toggle commenting of the current line or range
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
92 noremap <silent><buffer> <LocalLeader><LocalLeader>
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
93 \ :call <SID>Abaqus_ToggleComment()<CR>j
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
94 function! <SID>Abaqus_ToggleComment() range
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
95 if strpart(getline(a:firstline), 0, 2) == "**"
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
96 " Un-comment all lines in range
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
97 silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
98 else
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
99 " Comment all lines in range
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
100 silent execute a:firstline . ',' . a:lastline . 's/^/**/'
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
101 endif
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
102 endfunction
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
103
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
104 " Map \s to swap first two comma separated fields
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
105 noremap <silent><buffer> <LocalLeader>s :call <SID>Abaqus_Swap()<CR>
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
106 function! <SID>Abaqus_Swap() range
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
107 silent execute a:firstline . ',' . a:lastline . 's/\([^*,]*\),\([^,]*\)/\2,\1/'
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
108 endfunction
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
110 let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
111 \ . "|unmap <buffer> <LocalLeader><LocalLeader>"
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29659
diff changeset
112 \ . "|unmap <buffer> <LocalLeader>s"
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
113 endif
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
114
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
115 " Undo must be done in nocompatible mode for <LocalLeader>.
28808
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
116 let b:undo_ftplugin = "let b:cpo_save = &cpoptions|"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
117 \ . "set cpoptions&vim|"
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
118 \ . b:undo_ftplugin
28808
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
119 \ . "|let &cpoptions = b:cpo_save"
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
120 \ . "|unlet b:cpo_save"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
121
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 " Restore saved compatibility options
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 let &cpoptions = s:cpo_save
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
124 unlet s:cpo_save