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

  • Home
  • SEARCH
  • 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 9115559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:27:42+00:00 2026-06-17T04:27:42+00:00

I have added the coffee syntax and indent plugin for vim. Here is my

  • 0

I have added the coffee syntax and indent plugin for vim. Here is my ~/.vimrc:

colorscheme peachpuff
syntax on
filetype on
source /Users/(myusername)/.vim/vim-coffee-script-master/indent/coffee.vim
source /Users/(myusername)/.vim/vim-coffee-script-master/syntax/coffee.vim

au BufNewFile,BufRead *.js set filetype=javascript
au BufNewFile,BufRead *.coffee set filetype=coffee
au BufNewFile,BufRead *.rake set filetype=ruby
au BufNewFile,BufRead *.rb set filetype=ruby
au BufNewFile,BufRead Gemfile set filetype=ruby
au BufNewFile,BufRead Guardfile set filetype=ruby
au BufNewFile,BufRead *.less set filetype=scss

set autoindent
set expandtab
set softtabstop=2
set shiftwidth=2

This doesn’t have the syntax highlighting when I open a .coffee file. I then run :so ~/.vimrc while I am in the file and the syntax highlighting appears. Also, when I split the screen and run :so ~/.vimrc in one window it disappears in the other. Any ideas?

  • 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-17T04:27:43+00:00Added an answer on June 17, 2026 at 4:27 am

    The .vimrc file is for global settings. By sourcing coffee-specific scripts in there, you only temporarily apply them to the bare Vim during startup; any files you open aren’t affected by it.

    Instead, Vim has an elaborate mechanism for detecting various types of programming languages and other file types; cp. :help filetypes. Syntax files should be placed into ~/.vim/syntax/ and indents into ~/.vim/indent/. Then, once you :setf coffee (or if there is a detection defined for *.coffee), it’ll all be automatically activated.

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

Sidebar

Related Questions

I have added a plugin called scrollpaper to a site I'm working on. The
I have added following lines at start of %PRPOGRA~%\Notepad++\plugin\APIs\php.xml <KeyWord name=$_GET></KeyWord> <KeyWord name=$_POST></KeyWord> <KeyWord
I have added a navigation controller inside a viewcontroller thats inside another navigation controller...
I have added an UIImageView as a subview in UIView , and then I
I have added an HTML file to my solution in VS2010. How do you
I have added a TextField to a UICell in order to allow a user
I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
I have added a checker to ensure that all fields in a form have
I have added an external .exe file into my VS2010 setup project and I'd
I have added the sdk files like dropbox website says, but I can't figure

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.