It seems like vim doesn't ship with syntax / filetype files for the ILE RPG programming language:
https://en.wikipedia.org/wiki/IBM_RPG and
https://www.ibm.com/docs/en/i/7.5?topic=rpg-ile-programmers-guide
This PR contains ftdetect, syntax, indent and ftplugin files for Free Form ILE RPG files.
The files *.rpgle
and *.rpgleinc
will be detected as being the filetype=rpgle
.
This PR contains adopted code from https://github.com/andlrc/rpgle.vim
https://github.com/vim/vim/pull/12152
(9 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Forgive me if this is a stupid question stemming from my curiosity, but is ILE RPG the same as IBM's? RPG was on my todo list of creating treesitter grammars for to then add (really good) syntax highliighting support in neovim treesitter
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@dkearns commented on this pull request.
In runtime/ftplugin/rpgle.vim:
> +xnoremap <script> <buffer> <silent> <Plug>XRpglePrevProcEnd + \ :<C-U>call rpgle#NextSection('^\s*end-proc', 'b', 'x')<CR> + +" Nest jumping +nnoremap <script> <buffer> <silent> <Plug>RpglePrevBlock + \ :call rpgle#NextNest('b')<CR> +nnoremap <script> <buffer> <silent> <Plug>RpgleNextBlock + \ :call rpgle#NextNest('')<CR> + +" Operator Pending brackets +noremap <script> <buffer> <silent> <Plug>RpgleAroundBlock + \ :<C-U>call rpgle#Operator('a')<CR> +noremap <script> <buffer> <silent> <Plug>RpgleInnerBlock + \ :<C-U>call rpgle#Operator('i')<CR> + +if !get(g:, 'rpgle_skipMapping', 0)
It would be better to use the standard mechanism to disable plugin mappings. See :help no_plugin_maps
.
So this line would be something like:
if !exists("g:no_plugin_maps") && !exists("g:no_rpgle_maps")
This file should also set b:undo_ftplugin.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I can include the filetype detection part. If there is something in
common with other RPG filetypes that can be handled in the plugins.
The way I read this is that the ftplugin, syntax, indent etc, should be handled by an external plugin, I guess that makes sense.
I can see that you already included the filetype detection part, so I'll close up this PR then.
There is no need to include an update for doc/tags, it's generated.
Good to know.
You should not use "function!" in plugins. [...]
In the syntax file please use "hi def link" instead of "highlight link".
and
It would be better to use the standard mechanism to disable plugin mappings. See :help no_plugin_maps.
[...]
This file should also set b:undo_ftplugin.
Thanks for the valuable feedback, I'll bring it upstream in the previous linked plugin.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@andlrc pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
Merging #12152 (daef3b0) into master (d11ac40) will decrease coverage by
1.19%
.
The diff coverage isn/a
.
@@ Coverage Diff @@ ## master #12152 +/- ## ========================================== - Coverage 82.31% 81.12% -1.19% ========================================== Files 154 154 Lines 183678 183631 -47 Branches 41400 41400 ========================================== - Hits 151193 148974 -2219 - Misses 19932 21704 +1772 - Partials 12553 12953 +400
Flag | Coverage Δ | |
---|---|---|
huge-clang-none | 82.66% <ø> (+<0.01%) |
⬆️ |
huge-gcc-testgui | ? |
|
huge-gcc-unittests | 0.29% <ø> (ø) |
|
linux | 81.12% <ø> (-1.19%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
see 114 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Closed #12152.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.