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 3425654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:37:12+00:00 2026-05-18T06:37:12+00:00

When I am writing documents, I find myself settling on an organization convention appropriate

  • 0

When I am writing documents, I find myself settling on an organization convention appropriate to that document, and I would like Vim to syntax highlight that convention. But making a ftplugin is too “global”, I want the syntax coloring to come with the document, so if I send it somewhere without that plugin they can still get the coloring. I found that you can’t do it through the modeline because that only accepts options.

Right now I am trying to find out if there is a way to select some text in visual mode (or whatever) and have it executed as a series of Vim commands.

For example, at the bottom of one document I have:

vim highlighting:
    syn match Comment "^>.*$"

How can I select that text and say “boom, execute it” rather than having to retype it?

  • 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-05-18T06:37:13+00:00Added an answer on May 18, 2026 at 6:37 am

    You can select the lines, yank the selection and execute it with

    :@"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find myself writing code that looks something like this: $(document).ready(function(){ updateStuff(); $('select').change(function(){ updateStuff();
I'm writing a Mono application and would like to find the full path of
I find myself writing a lot of code like putStr foo (bar 1) (bar
I'm writing some code that handles logging xml data and I would like to
37 Signal's Getting Real convinced me that wireframing and writing functional specification documents are
I'm writing a windows service application that needs to serialize and deserialize XML documents
I am writing an XML document in C#. I have something like this... string
I'm writing a Sweave document, and I want to include a small section that
I'm writing a program that needs a generic temp folder. I'm trying to find
I'm writing an application that faxes a document (many supported types) provided by the

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.