Added more flags for launching vim

This commit is contained in:
Igor Irianto 2020-11-14 14:28:13 -06:00
parent 53e728d8d6
commit 04a5e5b303

View file

@ -218,22 +218,32 @@ Your vimrc should look like this:
+-- 4 lines: mappings --------
```
## Running vim without vimrc
## Running Vim With Or Without Vimrc And Plugins
If you need to run Vim without any vimrc, run this from the terminal:
If you need to run Vim without both vimrc and plugins, run:
```
vim -u NONE
```
If you need to run Vim with a *different* vimrc, say `~/.vimrc-extra`, run this from the terminal:
If you need to launch Vim without vimrc but with plugins, run:
```
vim -u NORC
```
If you need to run Vim with vimrc but without plugins, run:
```
vim --noplugin
```
If you need to run Vim with a *different* vimrc, say `~/.vimrc-extra`, run:
```
vim -u ~/.vimrc-extra
```
The `u` flag overwrites all the seven vimrc paths mentioned earlier.
## Configure Vimrc The Smart Way
In the beginning, there is a strong temptation to copy other people's vimrc. Resist it. By copying other people's vimrc, you might not always know what you're copying. It doesn't matter if other developer has over 1000 lines of vimrc while yours only have 10. As long as you get the job done, that's all that matters.