partial syntax in vim

Andreas Otto <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
Hi is it possible to change the syntax for a limit part of a file?
example: tcl file with bash syntax used with "pseudo code" vim: push … vim: 
pop

if {checkNotIgnore("DIFF")} {
  File_Exec_BASH {
    # vim: push syntax=bash
    set -ue

    [[ "$(yes_or_no.bash 'want to exit?')" == "y" ]] && exit

    declare -a files=($(find . -name .vimrc 2>/dev/null))

    git diff "${files[@]}"

    if [[ $(git status --porcelain "${files[@]}") ]] ; then
      if [[ "$(yes_or_no.bash 'commit changes?')" = "y" ]] ; then
        git commit -m lng_Shortcut.tcl "${files[@]}"
      fi
      :
    fi
    exit 0
    # vim: pop syntax
  } <@stdin >@stdout 2>@stderr
}

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/abc1d980-74a7-4192-a288-6ad802758888n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.