Tuesday, November 15, 2011

New sh syntax highlighting

Hello

Can the syntax file for sh scripts be updated to accept the new features
for parameter, command and arithmetic substitution ?

Parameter substitution:
${parameter:-word}
${parameter-word}
${parameter:=word}
${parameter=word}
${parameter:?word}
${parameter?word}
${parameter:+word}
${parameter+word}

${#parameter}

${parameter%word}
${parameter%%word}
${parameter#word}
${parameter##word}

Command substitution
` cmd args... `
$(cmd args ...) - this works recursively (can be nested)

Arithmetic substitution:
$(( expression ))

(most C language operators are accepted). See:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

Can I manually add this new constructs to a local syntax file ?

Thank you,
Timothy Madden

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: