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

The Archive Base Latest Questions

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

My Vim configuration file is getting bigger (15KB+) . And I try not to

  • 0

My Vim configuration file is getting bigger (15KB+). And I try not to make my vim launch slower by sourcing more (larger) files at startup. For the same purpose I use only essential plugins and I try to keep the number of plugin as less as possible.

So, somewhere in my .vimrc file, I have these lines:

autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType python setlocal textwidth=78
autocmd FileType python match ErrorMsg '\%>80v.\+'
autocmd FileType python inoremap <F5> <esc>:upd\|!python %<cr>
autocmd FileType python nnoremap <F5> :upd\|!python %<cr>
autocmd FileType python nnoremap <leader>8 :w\|call Flake8()<cr>
autocmd FileType python setlocal formatoptions-=t
autocmd BufWritePost *.py call Flake8()

Now I see in first 7 lines, all lines have autocmd FileType python in common. So my thinking is, if we manage to replace all those word with something less then Vim will fire up faster. But I don’t know how to do that.

Can we group them? How? Anything else?

  • 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-10T08:57:14+00:00Added an answer on June 10, 2026 at 8:57 am

    Just put

    setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=78 formatoptions-=t
    match ErrorMsg '\%>80v.\+'
    inoremap <F5> <esc>:upd\|!python %<cr>
    nnoremap <F5> :upd\|!python %<cr>
    nnoremap <leader>8 :w\|call Flake8()<cr>
    

    in ~/.vim/after/ftplugin/python.vim.

    Vim will read this file only when you open a Python file.

    I’ve been meaning to do this for some time, actually. And for the same reasons.

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

Sidebar

Related Questions

I keep my vim configuration files on github to keep them synched across multiple
Here is my complete vim configuration files https://bitbucket.org/tristan_ph/dotvim . And my vimrc https://bitbucket.org/tristan_ph/dotvim/src/tip/.vimrc Here
How do I add a comment in Vim's configuration files, like .vimrc?
My terminal vim configuration is not loading the ~/.zshrc. Zsh is the environment login
When using the autoindent configuration from VIM, it will automatically indent your cursor to
I use vim on both FreeBSD and Linux os, sharing the same .vimrc configuration
Inside Vim on Windows, I'm trying to filter the lines in a file through
Sometimes I want to use a minimal vim configuration, so with pathogen I have
I recently saw some VIM configuration where search matches would scroll to N lines
I want to do the following: open 9 files in vim, (3 x 3

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.