Skip to content

Commit

Permalink
Set up for Neovim plugins; install NERDTree
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewtodd committed Aug 13, 2021
1 parent 850f260 commit 6eafc57
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "nerdtree"]
path = share/nvim/site/pack/matthewtodd/start/nerdtree
url = https://github.com/preservim/nerdtree
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Neovim Plugins

### Adding

```
# Add the plugin as a submodule in our package.
git submodule add --name nerdtree \
https://github.com/preservim/nerdtree \
share/nvim/site/pack/matthewtodd/start/nerdtree
```

### Tracking a Different Branch

```
git config -f .gitmodules submodule.nerdtree.branch stable
```

### Updating

```
./install
```

### Removing

```
# Via https://git-scm.com/docs/gitsubmodules
#
# Deleted submodule: A submodule can be deleted by running
# `git rm <submodule path> && git commit`. This can be undone using git revert.
#
# The deletion removes the superproject’s tracking data, which are both the
# gitlink entry and the section in the .gitmodules file. The submodule’s working
# directory is removed from the file system, but the Git directory is kept around
# as it to make it possible to checkout past commits without requiring fetching
# from another repository.
#
# To completely remove a submodule, manually delete `$GIT_DIR/modules/<name>/`.
git rm share/nvim/site/pack/matthewtodd/start/nerdtree
```

7 changes: 7 additions & 0 deletions etc/git/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
[diff]
algorithm = patience
indentHeuristic = true
submodule = log
[fetch]
parallel = 0
[help]
autocorrect = 5
[init]
Expand All @@ -21,6 +24,10 @@
[rebase]
autosquash = true
autostash = true
[status]
submodulesummary = 1
[submodule]
recurse = true
[url "[email protected]:"]
insteadOf = https://github.com/
[user]
Expand Down
4 changes: 4 additions & 0 deletions etc/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
" keyboard shortcuts
let mapleader = ','
nmap <leader>d :NERDTreeToggle<CR>
nmap <leader>f :NERDTreeFind<CR>
1 change: 1 addition & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fish -c "BUNDLE_PATH='${XDG_DATA_HOME}/vim' bundle update --gemfile=${DIR}/share

fish -c 'vim +PlugUpgrade +PlugClean +PlugUpdate +qall'

fish -c "git submodule update --init --remote"
fish -c "mkdir -p '${XDG_DATA_HOME}/nvim'"
fish -c "ln -sfh ${DIR}/share/nvim/site '${XDG_DATA_HOME}/nvim/site'"

Expand Down
1 change: 1 addition & 0 deletions share/nvim/site/pack/matthewtodd/start/nerdtree
Submodule nerdtree added at 0e7146

0 comments on commit 6eafc57

Please sign in to comment.