File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
10
10
11
11
For a steady stream of TILs, [ sign up for my newsletter] ( https://tinyletter.com/jbranchaud ) .
12
12
13
- _ 997 TILs and counting..._
13
+ _ 998 TILs and counting..._
14
14
15
15
---
16
16
@@ -1118,6 +1118,7 @@ _997 TILs and counting..._
1118
1118
- [ Split Different] ( vim/split-different.md )
1119
1119
- [ Split The Current Window] ( vim/split-the-current-window.md )
1120
1120
- [ Splitting For New Files] ( vim/splitting-for-new-files.md )
1121
+ - [ Source Original vimrc When Using Neovim] ( vim/source-original-vimrc-when-using-neovim.md )
1121
1122
- [ Swap Occurrences Of Two Words] ( vim/swap-occurrences-of-two-words.md )
1122
1123
- [ Swapping Split Windows] ( vim/swapping-split-windows.md )
1123
1124
- [ Tabs To Spaces] ( vim/tabs-to-spaces.md )
Original file line number Diff line number Diff line change
1
+ # Source Original vimrc When Using Neovim
2
+
3
+ If you install [ Neovim] ( https://neovim.io/ ) and open up a new ` nvim ` session,
4
+ you might notice that none of your carefully crafted ` ~/.vimrc ` configuration
5
+ is taking effect.
6
+
7
+ This is because the ` ~/.vimrc ` file is not part of Neovim's default
8
+ ` runtimepath ` (see ` :h runtimepath ` for details on what is included).
9
+
10
+ For custom user-land configuration of your Neovim sessions, you should start
11
+ with an ` init.vim ` file. For Mac users, it will likely be placed in
12
+ ` ~/.config/nvim/ ` . To be sure where it belongs, you can run `: echo
13
+ stdpath('config')`.
14
+
15
+ In that file, you can add any Neovim-specific configuration. You can also take
16
+ the opportunity to source your ` ~/.vimrc ` file so that you get all those
17
+ configurations. These lines will do the trick.
18
+
19
+ ``` vimrc
20
+ if filereadable(expand('~/.vimrc'))
21
+ source ~/.vimrc
22
+ endif
23
+ ```
24
+
25
+ Things tend to be backward compatible, so you aren't likely to run into issues
26
+ with what's in your ` ~/.vimrc ` . At any rate, it is a good starting point for
27
+ getting back to a familiar configuration.
28
+
29
+ See ` :h nvim ` for more details about how to transition.
You can’t perform that action at this time.
0 commit comments