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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:29:54+00:00 2026-05-15T23:29:54+00:00

I am working on a project writing a GLSL fragment shader, and it just

  • 0

I am working on a project writing a GLSL fragment shader, and it just so happens it has the file extension .fs, thus vim automatically loads the forth syntax upon opening the file.

This normally would be no problem, I could just change the syntax using au BufRead but for some reason the forth syntax is loaded first, which completely messes things up. It adds more characters to a “word” which causes syntax highlighting and motions to not work as expected.

Is there a way to stop the forth syntax from loading, and only load my specified syntax?

  • 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-15T23:29:55+00:00Added an answer on May 15, 2026 at 11:29 pm

    Create a file in your .vim directory (or vimfiles directory on Windows) called filetype.vim and put this code in it:

    if exists("did_load_filetypes")
        finish
    endif
    
    augroup filetypedetect
    
        " Ignore filetypes for *.fs files
        autocmd! BufNewFile,BufRead *.fs  setfiletype ignored
    
    augroup END
    

    This places a custom filetype-detection script ahead of Vim’s default filetype autocommands, so your detection autocommands get a chance to determine the filetype before the usual Vim scripts.

    Once you restart Vim and attempt to load a .fs file, it should no longer use Forth syntax highlighting, and iskeyword should still be set to the default value. (If you’ve installed a syntax file for the GLSL fragment files, you can replace the ignored with the appropriate filetype name.)

    See these topics for more info:

    :help remove-filetype
    :help new-filetype
    :help :setfiletype
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam working on a project which involves writing a Mork File (Mork is a
I'm currently working on a project which will support multiple file writing specifications (imagine
Im writing some helper functions for a project im working on. I've always wanted
While writing a login system for a web project Im working on I came
I'm working on a small design project, part of which involved writing out text
I'm trying to get intellisense working in MonoDevelop when writing an ObjC binding project.
While working a project tonight, I ended up using one .js resource file for
I am working on a project that requires programmatically distributing a compressed file that
I'm working in a Scrum project writing firmware code in C for an ASIC.
I'm writing a project and working with another party DLL. Function from their DLL

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.