An open API service indexing awesome lists of open source software.

https://github.com/klauer/epics-ultisnips

neovim/vim UltiSnips for EPICS-related tasks
https://github.com/klauer/epics-ultisnips

epics epics-ultisnips snippets ultisnips vim

Last synced: about 1 month ago
JSON representation

neovim/vim UltiSnips for EPICS-related tasks

Awesome Lists containing this project

README

        

## EPICS UltiSnips

### VSCode-converted Snippets

Most are auto-converted from these handy VSCode snippets:
https://github.com/NSenaud/vscode-epics

* database and template files (.db and .template)
* substitutions files (.substitutions, .sub, and .subs)
* startup files (.cmd and .iocsh)
* C source code
* streamdevice prototype files (.proto)
* SNL files (over charge of your .c extension)
* we-test (scenario and suite)

### Additional snippets

* caproto PVGroup-related snippets

## (neo)vim Installation

By way of [vim-plug](http://github.com/junegunn/vim-plug/):

```
call plug#begin('~/.vim/plugged')

" Highlighting + filetype setting
Plug 'NickeZ/epics.vim'

" Ultisnips + EPICS ultisnips
Plug 'SirVer/ultisnips'
Plug 'klauer/epics-ultisnips'

" Optionally grab useful snippets for other file types:
Plug 'honza/vim-snippets'

call plug#end()

" Configure your expand trigger:
let g:UltiSnipsExpandTrigger=""
let g:UltiSnipsJumpForwardTrigger=""
let g:UltiSnipsJumpBackwardTrigger=""
```

Then

```
$ vim test.db
record.ai
```

Expands to this, where you can use the forward/backward mappings
(``/`` above) to change the individual fields:

```
record(ai, "record_name") {
field(DESC, "description")
field(DTYP, "Soft Channel stream")
field(SCAN, ".1 second 1 second I/O Intr Event Passive")
field(INP, "input link")
}
```

## See also

* Syntax highlighting: https://github.com/NickeZ/epics.vim