Vim source config file


















In Vim, there is a solution. Vim can automatically replace tabs to spaces. So, when you insert tab into your code, Vim will automatically replace it with 4 white spaces. To replace tabs with white spaces, type in the following Vim command in your vimrc file. Luckily, Vim has remedies for that. To do that, open your vimrc file and type in the following Vim command:.

You can add Vim functions and other commands on the vimrc file to configure Vim. That is the system vimrc. Same in Ubuntu, as I found. Rook Rook YannisDran - Uhmm, what? Idigas I was typing :echo xxx on my command window but I realized now you meant to type this into the vim editor.

However, even though :e xxx works, the :echo xxx doesn't. Not :echo myvimrc by any chance? Btw, now vim responds nothing, it only puts the indicator at the first line of vim. Vim-Vi Improved v. Show 3 more comments.

For whatever reason, these answers didn't quite work for me. Aaron Aaron 1 1 gold badge 6 6 silver badges 16 16 bronze badges. I don't understand how the existing answers didn't quite work for you when in fact the solution you proposed is already covered by them.

Completely agree with you. What I meant to say was lost when my answer was edited — Aaron. SebMa 2, 22 22 silver badges 30 30 bronze badges. Version 8. This tells you the directory your system vimrc is located in, but it doesn't tell you where your user vimrc should go, or what its name should be.

Well, the question "where" is the vimrc file. Where user vimrc should go? I'd like to share how I set showing the line number as the default on Mac. In a terminal, type cd. This will help you go to the home folder. In the terminal, type vi. This will create an empty vimrc system file which you want to use. In the file, type set number , and then hit Esc on the keyboard and type in :wq. This will set the line number shown in the default setting file vimrc and save it.

If not, try to restart the terminal completely. Jinggang Jinggang 4 4 silver badges 11 11 bronze badges. One thing I needed to change to the above for my CentOS7 install : after step 1, type "cd username". Community Bot 1 1 1 silver badge. Ben Ben FreelanceConsultant FreelanceConsultant Jason Jason 1, 18 18 silver badges 17 17 bronze badges. This presumes a keyboard with a US layout.

Plugins put in that dir will be loaded automatically also plugins put in subdirectories of "plugin". If you do not wish to load it automatically, just put it in your "vimfiles", or some other directory, and. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How do I "source" something in my. Ask Question. Asked 12 years, 8 months ago.

Active 3 years, 7 months ago. Viewed 94k times. Improve this question. Paul Wicks Paul Wicks 58k 55 55 gold badges silver badges bronze badges. Add a comment. Active Oldest Votes. So if you source myStuff. Improve this answer. Proposal Omit suggestions like the following that attempt to auto-source vimrc. I suspect that anyone needing to read a tip to do this could get themselves in quite a bit of trouble.

IMHO it's a lot more sensible to map a key to source a script so you can control when it is sourced. Getting started tip I hit this page because I could not remember the "mkvim" command. I found it elsewhere and thought I'd throw it in here. If you open vim, change some settings and get things how you like you can use this command. If you already have a. You can use. However once you do this your original. Vim Tips Wiki Explore.



0コメント

  • 1000 / 1000