Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9191789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:46:15+00:00 2026-06-17T20:46:15+00:00

Ive got file that uses java code blocks, Is it possible to tell vim

  • 0

Ive got file that uses java code blocks, Is it possible to tell vim in syntax file to import java.vim syntax file for a whole region ?

Example:

syn region javaCode start="<Java>" end="</Java>" 
hi link javaCode source ????
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:46:16+00:00Added an answer on June 17, 2026 at 8:46 pm

    The easiest is to just

    :set syntax=java
    

    and focus on the Java part. However, if you want to overlay the Java syntax in your own syntax file, :syntax region is the way to go. :help :syn-include has the details:

    :syntax include @Java syntax/java.vim
    :syntax region myJava start="<java>" end="</java>" contains=@Java
    

    PS: Since the command is complex (but that’s okay in syntax scripts that include another syntax) and hard to remember, I’ve written the SyntaxRange plugin to make setting up such regions easier. For your example, it’d be this call:

    :call SyntaxRange#Include('<java>', '</java>', 'java', 'NonText')
    

    The plugin is meant for occasional, ad-hoc use. If you write your own syntax script, I’d avoid this dependency and directly use the syntax commands from above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a an AJAX page request that uses a php file designed to
I've got a source code file that started as a copy of some sample
I've got one really big .java class file that has a lot of members.
Is this possible? I've got one jquery file that is loaded in every page
I've got a method that uses a WebRequest to upload a file to a
I've got some Java Applet that I'd like to use to upload file/files to
I've got a Visual Studio Setup Project that uses the msiexec.exe file to create
I've got a small file upload system on my Django website that uses their
I've got this code that uses an fstream to read and write to a
Ok, so I've got an Open Source Java client/server program that uses packets to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.