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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:13:44+00:00 2026-06-10T03:13:44+00:00

I prefer having different colorscheme for python and different for rest of the files.

  • 0

I prefer having different colorscheme for python and different for rest of the files.

So, what I did is added the below two lines in my vimrc:

"for python file
autocmd! BufEnter,BufNewFile *.py colo badwolf
autocmd! BufLeave *.py colo badwolf

"for rest of the files
colo molokai

Everything works fine when I open a new/pre-exixting file in vim using vim test.py but problem occur when I split my vim window into two using :split .scripts/test.sh.

What happens is after splitting the window when my cursor moves to the new-split window(.sh) I get molokai colorscheme for my python file and when I shift my cursor to my old window(.py) I get badwolf colorscheme in my .sh window. So, as you can see eventually I have the same colorscheme in my windows depending upon which file-type is in focus.

In case of Vim-Tab as soon as I open a file which has it’s pre-defined colorscheme(via autocmd) all the tabs apply that colorscheme.

So, is there any way I can have different colorschemes in vim split windows and tabs.

  • 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-10T03:13:46+00:00Added an answer on June 10, 2026 at 3:13 am

    I don’t think that it’s possible to reliably have different colorschemes active at the same time.

    In fact, I’m very surprised that you are able to load different colorschemes for different windows. :colorscheme molokai is a global command that works on every buffer.

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

Sidebar

Related Questions

I prefer using Notepad++ for developing, How do I execute the files in Python
I prefer for the solution file to be in the same folder as the
I am trying to work out how to do the mappings for two different
i prefer jquery. let's say i have a string with , adam, lisa, john,
// I prefer to perform forward declaration on myclass, as I do not //
I prefer to have the exception handling logic further up in the call stack,
Usually I prefer to write my own solutions for trivial problems because generally plugins
Possible Duplicate: Prefer composition over inheritance? I wonder, why (or in which cases) should
What should I prefer when updating the database? What are the pros & cons
How do you prefer to manage the contents of your site , XSLT ,

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.