Match file content for vim syntax highlighting #4319
reinerh
started this conversation in
Show and tell
Replies: 2 comments
-
Thanks. Until now I allways An other way is to add autocmd BufNewFile,BufRead */firejail/*.inc setfiletype firejail
autocmd BufNewFile,BufRead */firejail/*.local setfiletype firejail
autocmd BufNewFile,BufRead */firejail/*.profile setfiletype firejail to |
Beta Was this translation helpful? Give feedback.
0 replies
-
Original code for reference: autocmd BufNewFile,BufRead */firejail/*.inc set syntax=sh
autocmd BufNewFile,BufRead */firejail/*.local set syntax=sh
autocmd BufNewFile,BufRead */firejail/*.profile set syntax=sh Related PR: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently the provided syntax files for vim only detect profiles in
/etc/firejail/
and~/.config/firejail/
(based on file extension).For profile development it might be useful to let vim also detect the filetype in
firejail.git/etc/profile-*/
.To accomplish this, you can add the following line to your
~/.vimrc
:(it will check the first line for
# Firejail profile
)I haven't added it to
ftdetect/firejail.vim
, as I think it's not necessary to scan this for every file opened in vim.But it might be interesting for people who develop profiles (@glitsj16 @rusty-snake 😄).
Beta Was this translation helpful? Give feedback.
All reactions