Vim 9 Ignoring Stuff on /usr/share/vim/vim90/

Abstract: Resolve Vim ignoring custom scripts by moving them from the read-only system directory /usr/share/vim/vim90/ to ~/.vimrc.

Created: 2026-09-12 by

Vim ignores files in /usr/share/vim/vim90/ because that directory is strictly for runtime defaults, not user configuration. User settings must be placed in ~/.vimrc or ~/.config/nvim/init.vim. Moving your custom scripts to the correct location resolves the issue immediately without changing permissions.

Understanding Vim’s Directory Structure

To troubleshoot why Vim appears to ignore your configuration files in /usr/share/vim/vim90/, you must first understand how Vim organizes its file system. The directory structure is divided into two distinct categories: system-wide defaults and user-specific configurations. This separation ensures that package managers can update Vim safely without overwriting personal preferences. The path /usr/share/vim/vim90/ (or similar versioned paths like vim82) resides within the system share area. Files here are owned by the root user and are read-only for standard users. They contain the default behavior of Vim, such as syntax highlighting rules, basic key mappings, and plugin templates provided by the Fedora distribution. When you place a file here, you are modifying the base image of the editor. Vim explicitly skips sourcing most files from this directory during startup unless they are specifically designated as runtime defaults. It does not treat them as active configuration files. If you have placed a script intended to change your theme or define aliases in this folder, Vim will silently ignore it. This is not a bug; it is a security and stability feature. Modifying these files can lead to conflicts during updates, where the package manager might reset your changes or fail due to permission errors. For user customization, Vim looks exclusively at the home directory. The primary file is ~/.vimrc for Vim 8 and 9. For Neovim, which shares much of the ecosystem, the path is ~/.config/nvim/init.vim. These locations are writable by the user and are sourced automatically every time the editor launches. If your commands are not working, check if they are in the wrong directory rather than assuming the editor is broken.

The Role of Permissions

A common misconception is that changing permissions on /usr/share/vim/vim90/ will force Vim to read your files. You should never run chmod 755 or chmod 644 on system directories. Doing so breaks the integrity checks performed by package managers like DNF on Fedora. It can also expose the system to security vulnerabilities if malicious scripts are introduced. The silence you observe is Vim respecting the read-only nature of the system directory, not failing to access it. If you need to extend functionality provided in the system directory, use the runtime! glob() command in your ~/.vimrc to source specific files from the system path, or better yet, install plugins via a plugin manager like vim-plug or packer.nvim. These tools handle dependencies and placement correctly, ensuring your customizations remain separate from system defaults.

Correcting Your Configuration Path

To fix the issue, move your configuration files out of /usr/share/vim/vim90/ and into your home directory. First, identify the settings you wish to apply. Common examples include setting line numbers, enabling mouse support, or defining custom key bindings. Create or edit the file ~/.vimrc using any text editor. Add your desired commands to this file. For example, to enable line numbers, add set number. To map a key, use nnoremap. Save the file and restart Vim. Your changes should now take effect. If you are using a plugin manager, ensure that your initialization code is also in ~/.vimrc or a dedicated init.vim file. Plugin managers expect to find their configuration in user-space directories. Plugging them into the system directory will prevent them from loading correctly.

Verifying File Sourcing

You can verify which files Vim is sourcing by running :scriptnames in command-line mode. This command lists all scripts that were loaded during startup. Look for ~/.vimrc in the output. If it is missing, Vim did not find the file. Check the spelling and location. Ensure there are no typos in the filename. If you suspect a conflict, you can debug further by starting Vim with vim -u NONE. This disables all configuration files. If your settings work when manually entered, the issue is likely a syntax error in your ~/.vimrc. Use :messages to view any error logs generated during startup.

Related Resources

If you are dealing with complex editing tasks, understanding how to manipulate text efficiently is crucial. For instance, you might want to merge lines based on delimiters. See our guide on Merging Lines with Semicolon in VIM: A Comprehensive Guide for advanced text manipulation techniques. Additionally, if you are configuring key mappings and find that your shortcuts are not responding as expected, check for conflicts with existing mappings. Our article on Fixing Vim: Map Command Not Working Correctly with F2 Key provides detailed troubleshooting steps for mapping issues.

Frequently Asked Questions

Why does Vim ignore my .vimrc file?

Vim ignores your .vimrc if it is located in the wrong directory or named incorrectly. Ensure the file is named exactly .vimrc and resides in your home directory (~). Check for hidden characters or typos in the filename.

Can I modify files in /usr/share/vim/vim90/ permanently?

No, you should not modify files in this directory. Package updates will overwrite your changes, and altering system files can break the operating system's integrity. Use ~/.vimrc for all persistent customizations instead.

How do I check which config files Vim is loading?

Run the command :scriptnames inside Vim. This displays a list of all sourced scripts. Look for .vimrc or init.vim to confirm your configuration was loaded successfully.

What is the difference between .vimrc and init.vim?

.vimrc is used by Vim 8 and Vim 9, while init.vim is used by Neovim. They serve the same purpose but are interpreted by different editors. Do not mix them up if you switch between Vim and Neovim.

Why are my key mappings not working after moving configs?

Your key mappings may not work if they are defined before other plugins load. Move your mappings to the end of .vimrc or use autocmd events to ensure they execute after initialization. Also, verify that no other plugin is overriding your mappings.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More