annotate runtime/ftplugin/abaqus.vim @ 29816:bbe62ea78aac v9.0.0247

patch 9.0.0247: cannot add padding to virtual text without highlight Commit: https://github.com/vim/vim/commit/f396ce83eebf6c61596184231d39ce4d41eeac04 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 23 18:39:37 2022 +0100 patch 9.0.0247: cannot add padding to virtual text without highlight Problem: Cannot add padding to virtual text without highlight. Solution: Add the "text_padding_left" argument. (issue https://github.com/vim/vim/issues/10906)
author Bram Moolenaar <Bram@vim.org>
date Tue, 23 Aug 2022 19:45:05 +0200
parents 2198955f9e27
children 3295247d97a5
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>
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
4 " Last Change: 2022 Aug 03
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Save the compatibility options and temporarily switch to vim defaults
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let s:cpo_save = &cpoptions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 set cpoptions&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Set the format of the include file specification for Abaqus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Used in :check gf ^wf [i and other commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 setlocal include=\\<\\cINPUT\\s*=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Remove characters up to the first = when evaluating filenames
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 setlocal includeexpr=substitute(v:fname,'.\\{-}=','','')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
15
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
23 " Remove comma from valid filename characters since it is used to
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
24 " separate keyword parameters
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
25 setlocal isfname-=,
631143ac4a01 updated for version 7.0007
vimboss
parents: 7
diff changeset
26
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Define format of comment lines (see 'formatoptions' for uses)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 setlocal comments=:**
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 setlocal commentstring=**%s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Definitions start with a * and assign a NAME, NSET, or ELSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Used in [d ^wd and other commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Abaqus keywords and identifiers may include a - character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 setlocal iskeyword+=-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
38 let b:undo_ftplugin = "setlocal include< includeexpr< isfname<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
39 \ . " comments< commentstring< define< iskeyword<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
40
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
41 if has("folding")
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
42 " Fold all lines that do not begin with *
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
43 setlocal foldexpr=getline(v:lnum)[0]!=\"\*\"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
44 setlocal foldmethod=expr
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
45 let b:undo_ftplugin .= " foldexpr< foldmethod<"
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
46 endif
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
47
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " 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
49 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 \ "Abaqus Results (*.dat)\t*.dat\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 \ "All Files (*.*)\t*.*\n"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
54 let b:undo_ftplugin .= "|unlet! b:browsefilter"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
57 " Define patterns for the matchit plugin
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
58 if exists("loaded_matchit") && !exists("b:match_words")
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
59 let b:match_ignorecase = 1
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
60 let b:match_words =
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
61 \ '\*part:\*end\s*part,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
62 \ '\*assembly:\*end\s*assembly,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
63 \ '\*instance:\*end\s*instance,' .
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
64 \ '\*step:\*end\s*step'
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
65 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
66 endif
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
67
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
68 if !exists("no_plugin_maps") && !exists("no_abaqus_maps")
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
69 " Define keys used to move [count] keywords backward or forward.
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
70 noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR>
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
71 noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
73 " Define key to toggle commenting of the current line or range
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
74 noremap <silent><buffer> <LocalLeader><LocalLeader>
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
75 \ :call <SID>Abaqus_ToggleComment()<CR>j
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
76 function! <SID>Abaqus_ToggleComment() range
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
77 if strpart(getline(a:firstline), 0, 2) == "**"
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
78 " Un-comment all lines in range
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
79 silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
80 else
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
81 " Comment all lines in range
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
82 silent execute a:firstline . ',' . a:lastline . 's/^/**/'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
83 endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
84 endfunction
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
86 let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
87 \ . "|unmap <buffer> <LocalLeader><LocalLeader>"
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28808
diff changeset
88 endif
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
89
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
90 " Undo must be done in nocompatible mode for <LocalLeader>.
28808
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
91 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
92 \ . "set cpoptions&vim|"
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
93 \ . b:undo_ftplugin
28808
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
94 \ . "|let &cpoptions = b:cpo_save"
0f0fed554cdc Update runtime files, translations
Bram Moolenaar <Bram@vim.org>
parents: 3496
diff changeset
95 \ . "|unlet b:cpo_save"
3496
d1e4abe8342c Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
96
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " Restore saved compatibility options
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 let &cpoptions = s:cpo_save
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
99 unlet s:cpo_save