How to make a global ~/.vimrc?
Solution 1
usually by creating /etc/vimrc or /etc/vim/vimrc. Depends on your version of vim and linux/unix
Solution 2
to create a default ~/.vimrc for all new users, you should be able to drop it into /etc/skel
If I recall correctly, that provides the template for new user's home directories.
Solution 3
In Debian, it appears the file you are looking for is:
/etc/vim/vimrc
It might be different in a different distro (though I think that is not much likely).
Good luck.
Solution 4
See :help system-vimrc
:
For Unix, MS-DOS, MS-Windows, OS/2, VMS, Macintosh, RISC-OS and Amiga the system vimrc file is read for initializations. The path of this file is shown with the ":version" command. Mostly it's "$VIM/vimrc". Note that this file is ALWAYS read in 'compatible' mode, since the automatic resetting of 'compatible' is only done later. Add a ":set nocp" command if you like.
So, put your system configurations in this file. Type :help version
in vim to see where, or echo $VIM
at the shell to see if $VIM
is defined. (Note that you may have to set $VIM
for all users, such as in a system bashrc file.)
Related videos on Youtube
Makah
Updated on September 17, 2022Comments
-
Makah over 1 year
I want to make a program in C# that imports two types of files to SQL Server: tab delimited and fixed columns. Actually, I need to download a file every day and import that file into my database. I could make a console app with batch script. I saw some examples like this, but I don´t know if it is the best object-oriented way to do it.
I could use
StreamReader
,Regex
and so on, but I don't want to re-invent the wheel.PS: In VBA I used "QueryTables.Add".
-
msarchet over 12 yearsCould you show the format for what the file is supposed to look like related to the SQL server?
-
Aacini over 12 yearsPlease note that Batch tag is "used for Windows batch file questions". Don't use it just because your question is related to "batch" word in any way...
-
-
Alex over 14 yearsI am using CentOS
-
ennuikiller over 14 yearsshould be /etc/vimrc on CentOs
-
Alex over 14 yearsIt is /etc/vimrc
-
Makah over 12 yearsI'm using SQL Server 2008 express
-
Makah over 12 yearsI have some trash rows in my file. I need something like row patterns (Regex). I could create some file converter then use SQLBulk
-
vvondra over 8 yearsBy default it sources
/etc/vim/vimrc.local
which would be safer for updates -
majkinetor over 7 yearsDoesn't work on Solaris