# Vim Tips Thread

**URL:** <https://forum.codeselfstudy.com/t/vim-tips-thread/108>\
**Category:** Operating Systems, Editors, and Tools\
**Tags:** vim\
**Created:** [December 23, 2017, 4:27am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108 "2017-12-23T04:27:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [December 23, 2017, 4:27am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/1 "2017-12-23T04:27:23Z")

</div>

This thread is for posting Vim tips. A great way to improve Vim skills is to learn a few new tricks at a time and slowly incorporate them into your workflow.

I’ll start with a few tips, and we can keep adding more in the comments as we learn them.

Here are a few related tips about `%` and `!` in Vim:

## How to run Vim without `sudo`

I suspect that it’s better not to run Vim with `sudo`. Plugins and some other things might be able to execute code as root if Vim is run as root. I open Vim without `sudo` and then save protected files like this:

```plaintext
:w !sudo tee %

```

Find out more about the `tee` command by typing `man tee` in a bash (or similar) terminal.

## Running shell commands on your file

An exclamation point (`!`) will run shell commands (like in the `:w !sudo tee %` example above).

Say you have an unsorted list with duplicates in your editor like this:

```plaintext
elephant
bear
cat
alligator
alligator
bear
dog

```

You could sort it and remove duplicates by visually selecting all (`ggVG` – go to top, visually select line, go to bottom) and then running this command:

```plaintext
:!sort|uniq

```

That takes the selected text and runs (`!`) it through the shell’s `sort` command and then pipes it into the `uniq` command. The final result should be:

```plaintext
alligator
bear
cat
dog
elephant

```

You can use a variety of shell commands there.

Another quick example: read the output of a command into your current buffer:

```plaintext
:r !ls -alh

```

(It should work in Emacs’ Evil Mode too.)

## Reloading the `.vimrc` file while editing it

`%` refers to the current file in Vim. (See the `sudo` example above for one example.)

If you’re editing your `.vimrc` file and want to reload it without restarting vim, you can `source` the file (execute the commands in it) with:

```plaintext
:source %

```

or shorthand:

```plaintext
:so %

```

## `%` and find/replace

The `%` in a Vim search and replace also refers to the current file:

```plaintext
:%s/foo/bar/gc

```

It means: within the file (`%`) substitute `foo` with `bar` **g** lobally, and **c** onfirm each change.

If you visually select some text (for example, with `shift-v`), you can enter command mode with the `:` and then perform a substitution. The percent sign (meaning the current file) won’t be there this time, but it will look more like this:

```plaintext
:'<,'>s/foo/bar/gc

```

You can also limit substitutions by line numbers. So the following command would perform a search and replace to just lines 20-25:

```plaintext
:20,25s/foo/bar/gc

```

It can be fun to play around with `ex` too. (Command mode in Vim uses `ex`.) I think that seeing the older way of doing things with `ex` makes Vim’s way of doing things seem less strange. To print the file you can type `%p` and the same substitution commands (`:3,4/s/t/TTTTT/g`) work:

 ![ex-mode](https://forum.codeselfstudy.com/uploads/default/original/1X/78b13ec40ae5feeb9e54ab0dfb4e7a733477e625.png)

To open a file in `ex` do something like:

```plaintext
$ ex my-file.txt

```

To switch from `ex` to Vim, type `:visual`.

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [December 23, 2017, 8:48pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/2 "2017-12-23T20:48:46Z")

</div>

> [@Josh](#):
>
> read the output of a command into your current buffer

Another quick example: read your software versions into a README file:

```plaintext
:r !ruby -v
:r !rails -v

```

…in order to write something like this without leaving the editor:

```plaintext
## Versions

* Ruby 2.4.1
* Rails 5.1.4

```

(Pausing Vim is easy too: `ctrl-z` to put it to sleep, and `fg` at the command line to revive it.)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 4, 2018, 7:51pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/3 "2018-01-04T19:51:55Z")

</div>

I just saw this site mentioned today:  
[http://vimcasts.org/](http://vimcasts.org/)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 4, 2018, 11:07pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/4 "2018-01-04T23:07:15Z")

</div>

I’ve been looking for a better way to navigate files than nerdtree or the ctrl-p plugin. I was going to try unite, but then found out that this it’s being abandoned for denite.

> **[GitHub - Shougo/denite.nvim: :dragon: Dark powered asynchronous unite all...](https://github.com/Shougo/denite.nvim)**
>
> :dragon: Dark powered asynchronous unite all interfaces for Neovim/Vim8

It looks interesting so far. I installed it with Vim plug and then added one line in my .vimrc file to enable searching for files with `ctrl-p`:

```plaintext
nnoremap <C-p> :<C-u>Denite file_rec<CR>

```

My next step will be to read: `:h denite`.

Example of searching for files with the `ctrl-p` shortcut:

 ![denite](https://forum.codeselfstudy.com/uploads/default/original/1X/078efafd23ff9cf6ebf32ecf9d6b2899aff4e858.png)

There are more tips here:

> **[Reddit - The heart of the internet](https://www.reddit.com/r/neovim/comments/6b7d0n/help_how_to_configure_denite/?rdt=58804)**

and a video that I haven’t looked at yet, unfortunately only in Japanese:

[![](https://forum.codeselfstudy.com/uploads/default/original/2X/3/30fc1de45e13d48e931cbcee757144e9fded286c.jpeg "Denite.nvim ~The next generation of unite~") ](https://www.youtube.com/watch?v=u3ZsAVWCuMM)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [April 7, 2018, 4:43pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/5 "2018-04-07T16:43:13Z")

</div>

I saw this on HN – it allows you to make HTTP requests in Vim:

> **[GitHub - baverman/vial-http: Simple http rest tool for vim](https://github.com/baverman/vial-http)**
>
> Simple http rest tool for vim

It got me thinking that it’s pretty easy to do in default Vim without any plug-in.

Type this on a blank line in Vim:

```bash
curl https://api.github.com/orgs/codeselfstudy

```

Then press `Esc` to go into normal mode.

Press `yy` to “yank” (copy) the link into a register.

Then type:

```plaintext
:r !<C-r>"

```

where `<C-r>` is `ctrl-r`.

(`C-r "` will paste the contents of that register, which contains the yanked text of the `curl` request.)

Alternatively, you could type the following from normal mode, though it’s more difficult to edit the curl command once you enter command-line mode (as soon as your press `:` you enter command-line mode):

```plaintext
:r !curl https://api.github.com/orgs/codeselfstudy

```

Then press `Enter` to load the response in the Vim buffer.

An example `POST` request with curl:

```plaintext
curl -X POST https://jsonplaceholder.typicode.com/posts -H "Content-Type: application/json" -d '{"title": "Saluton Mondo", "body": "Lorem ipsum", "userId": 127}'

```

Here’s a quick example:

[![asciicast](https://forum.codeselfstudy.com/uploads/default/original/1X/36d2c5e3f7e589fec9d5820bb030cf26dde30dd0.png)](https://asciinema.org/a/Z4QeGb0t8jrY3LTXV5vDP2TGh)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [April 22, 2018, 1:25am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/6 "2018-04-22T01:25:39Z")

</div>

I was trying to figure out how to close all open buffers at once, without quitting, and came across this post.

The command is:

```auto
:buffdo bd

```

Here is a list of other commands mentioned:

```plaintext
:bd - deletes the current buffer, error if there are unwritten changes
:bd! - deletes the current buffer, no error if unwritten changes
:bufdo bd - deletes all buffers, stops at first error (unwritten changes)
:bufdo! bd - deletes all buffers except those with unwritten changes
:bufdo! bd! - deletes all buffers, no error on any unwritten changes

:bw - completely deletes the current buffer, error if there are unwritten changes
:bw! - completely deletes the current buffer, no error if unwritten changes
:bufdo bw - completely deletes all buffers, stops at first error (unwritten changes)
:bufdo! bw - completely deletes all buffers except those with unwritten changes
:bufdo! bw! - completely deletes all buffers, no error on any unwritten changes

:set confirm - confirm changes (Yes, No, Cancel) instead of error

:ls - list open buffers
:b N - open buffer number N (as shown in ls)
:tabe +Nbuf - open buffer number N in new tab
:bnext - go to the next buffer (:bn also)
:bprevious - go to the previous buffer (:bp also)

```

I haven’t used `:tabe +Nbuf` – I usually open the current buffer in a new tab with `ctrl-w shift-t`.

> <https://vi.stackexchange.com/questions/3066/close-and-unload-a-buffer-without-exiting-vim/5350#5350>

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [June 22, 2018, 8:28am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/7 "2018-06-22T08:28:43Z")

</div>

If anyone hasn’t discovered it yet, `gq` is a useful Vim command for wrapping lines.

It lets you write long lines without thinking about the number of characters. When finished typing, visually highlight the lines (`shift-v` and move up or down to select the text to reformat), and then type `gq` to wrap it.

[![asciicast](https://forum.codeselfstudy.com/uploads/default/original/1X/81840609e0d10a5f8835bb77eae9dccfa2dd40e0.png)](https://asciinema.org/a/188316)

I also have this in my `~/.vimrc` file:

```plaintext
" Use par for better `gq` formatting
" See http://vimcasts.org/episodes/formatting-text-with-par/
set formatprg=par
let $PARINIT = 'rTbgqR B=.,?_A_a Q=_s>|'

```

(`gq` should work in Emacs/Evil too.)

I’m writing some Python lately, and it’s useful, because PEP8 doesn’t like lines to be more than 79 characters long, and my editor complains…

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [August 25, 2018, 4:05am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/8 "2018-08-25T04:05:37Z")

</div>

I didn’t watch the video below, but I liked the auto-complete tips from [the slides](https://github.com/changemewtf/no_plugins/blob/master/no_plugins.vim).

**Examples:**  
(in insert mode)

- type `ctrl-x ctrl-f` to show a dropdown menu with auto-completed filenames.
- `ctrl-x ctrl-]` completes from tags.
- `ctrl-x ctrl-n` completes from names in the current file
- `ctrl-n` completes for anything specified by the “complete” option

`ctrl-p` (previous) and `ctrl-n` (next) move up and down the menus.

The video might have more information.

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [August 25, 2018, 10:09pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/9 "2018-08-25T22:09:56Z")

</div>

> [@Josh](#):
>
> I’ve been looking for a better way to navigate files than nerdtree or the ctrl-p plugin.

I finally have Denite set up the way I want, and it’s great. I pasted my denite config from `.vimrc` below. [RipGrep](https://github.com/BurntSushi/ripgrep) is installed.

```auto
" Denite ideas from https://github.com/sodiumjoe/dotfiles/blob/master/vimrc#L242 and elsewhere.
" reset 50% winheight on window resize
augroup deniteresize
  autocmd!
  autocmd VimResized,VimEnter * call denite#custom#option('default',
        \'winheight', winheight(0) / 2)
augroup end

call denite#custom#option('default', {
      \ 'prompt': '❯'
      \ })

call denite#custom#var('file_rec', 'command',
      \ ['rg', '--files', '--glob', '!.git', ''])
call denite#custom#var('grep', 'command', ['rg'])
call denite#custom#var('grep', 'default_opts',
      \ ['--hidden', '--vimgrep', '--no-heading', '-S'])
call denite#custom#var('grep', 'recursive_opts', [])
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
call denite#custom#map('insert', '<Esc>', '<denite:enter_mode:normal>',
      \'noremap')
call denite#custom#map('normal', '<Esc>', '<NOP>',
      \'noremap')

" ctrl-v and ctrl-h to open files in vertical and horizontal splits
call denite#custom#map('insert', '<C-v>', '<denite:do_action:vsplit>',
      \'noremap')
call denite#custom#map('normal', '<C-v>', '<denite:do_action:vsplit>',
      \'noremap')
call denite#custom#map('insert', '<C-h>', '<denite:do_action:split>',
      \'noremap')
call denite#custom#map('normal', '<C-h>', '<denite:do_action:split>',
      \'noremap')
call denite#custom#map('normal', 'dw', '<denite:delete_word_after_caret>',
      \'noremap')

" ctrl-n and ctrl-p to move down and up the denite menus
call denite#custom#map('insert', '<C-n>', '<denite:move_to_next_line>', 'noremap')
call denite#custom#map('insert', '<C-p>', '<denite:move_to_previous_line>', 'noremap')

" ctrl-p to find files
nnoremap <C-p> :<C-u>Denite file_rec<CR>

" leader-s to find buffers
nnoremap <leader>s :<C-u>Denite buffer<CR>
nnoremap <leader><leader>s :<C-u>DeniteBufferDir buffer<CR>

" leader-8 to grep for current word
nnoremap <leader>8 :<C-u>DeniteCursorWord grep:. -mode=normal<CR>

" leader-/ to grep
nnoremap <leader>/ :<C-u>Denite grep:. -mode=normal<CR>
nnoremap <leader><leader>/ :<C-u>DeniteBufferDir grep:. -mode=normal<CR>
nnoremap <leader>d :<C-u>DeniteBufferDir file_rec<CR>
nnoremap <leader><leader>r :<C-u>Denite -resume -cursor-pos=+1<CR>

" leader-o to load custom menu
nnoremap <leader>o :<C-u>Denite menu<CR>

hi link deniteMatchedChar Special

" Add custom menus
let s:menus = {}

let s:menus.config_files = {
    \ 'description': 'Edit config files'
    \ }

" quick access to config files
let s:menus.config_files.file_candidates = [
    \ ['.aliases', '~/.aliases'],
    \ ['.zshenv', '~/.zshenv'],
    \ ['.zshrc', '~/.zshrc'],
    \ ['.vimrc', '~/.vimrc'],
    \ ['.i3conf', '~/.config/i3/config'],
    \ ['.i3status.conf', '~/.i3status.conf'],
    \ ['.ctags', '~/.ctags'],
    \ ['global .gitconfig', '~/.gitconfig'],
    \ ['global .gitignore', '~/.gitignore'],
    \ ['.muttrc', '~/.muttrc'],
    \ ['.npmrc', '~/.npmrc'],
    \ ['.mongojsrc.js', '~/.mongojsrc.js'],
    \ ['.psqlrc', '~/.psqlrc'],
    \ ['.pgpass', '~/.pgpass'],
    \ ['.pythonrc', '~/.pythonrc'],
    \ ['.tmux.conf', '~/.tmux.conf'],
    \ ['.tern-config', '~/.tern-config'],
    \ ['.vuerc', '~/.vuerc'],
    \ ['.xinitrc', '~/.xinitrc'],
    \ ['.Xmodmap', '~/.Xmodmap'],
    \ ['.taskbook.json', '~/.taskbook.json'],
    \ ]

" let s:menus.vim = {
" \ 'description': 'Edit Vim config files'
" \ }
" let s:menus.vim.file_candidates = [
" \ ]

" let s:menus.vim.command_candidates = [
" \ ['Split the window', 'vnew'],
" \ ['Open zsh menu', 'Denite menu:zsh'],
" \ ]

call denite#custom#var('menu', 'menus', s:menus)
```

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [September 8, 2018, 5:13am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/14 "2018-09-08T05:13:05Z")

</div>

A post was split to a new topic: [Which-key for Vim and Emacs](https://forum.codeselfstudy.com/t/which-key-for-vim-and-emacs/1032)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [June 3, 2019, 5:03pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/15 "2019-06-03T17:03:43Z")

</div>

Here’s another post with tips:

> **[At least one Vim trick you might not know • Hillel Wayne](https://www.hillelwayne.com/post/intermediate-vim/)**
>
> I’ve been using Vim for eight years and am still discovering new things. This is usually seen as a Good Thing About Vim. In my head, though, it’s a failing of discoverability: I keep discovering new things because Vim makes it so hard to know what’s...

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [June 4, 2019, 10:05pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/16 "2019-06-04T22:05:56Z")

</div>

[Security problem](https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md)

It looks like it can be fixed by putting this in your `.vimrc` and updating vim/neovim:

```nohighlight
set nomodeline

```

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 11, 2020, 9:54am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/17 "2020-01-11T09:54:32Z")

</div>

This cheatsheet looks good.

[https://www.outcoldman.com/cheatsheets/vim/](https://www.outcoldman.com/cheatsheets/vim/)

---

<div class="post-metadata">

**Author:** ![Dale](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dale](https://forum.codeselfstudy.com/u/Dale)\
**Post date:** [January 26, 2020, 7:11am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/18 "2020-01-26T07:11:03Z")

</div>

Have you seen exuberant ctags before? Navigation is identical to help file syntax, eg ctrl-} and ctrl-t will be 90% of what you need. Works better for static languages but I’ve had luck with Python and PHP as long as I’m not too clever. $ctags -R \* will get you a “tags” file in the CWD and vim will automagically parse it when you open it in the same directory.

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 26, 2020, 7:22am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/19 "2020-01-26T07:22:13Z")

</div>

I use them. One thing I wish I could do is get it to keep the tags files out of my project. I have a line in my default `.gitignore`, but sometimes I forget to keep them out of the build, or they use up a lot of hard drive space. One of my small browser extensions was 300 MB until I realized that it was copying the `tags` file into the build. 🤔

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 26, 2020, 7:40am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/20 "2020-01-26T07:40:39Z")

</div>

I just ran this command to delete my tags files and freed up more than 3 GB on my hard drive.

```nohighlight
$ find . -type f -name tags -exec rm -fv "{}" \;

```

(I’m not sure how safe the command is, because there might be other files named `tags`, but I haven’t broken anything with it yet.)

---

<div class="post-metadata">

**Author:** ![Dale](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dale](https://forum.codeselfstudy.com/u/Dale)\
**Post date:** [January 26, 2020, 8:00am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/21 "2020-01-26T08:00:19Z")

</div>

That seems unreasonably high:

rw-rw-r-- 1 dale dale 44K Jan 25 23:57 tags

Granted this project isn’t that large. Even a 300mb tag file seems weird. A character is probably a byte in your encoding so you’re looking at 300 million characters in a tag file? Or 3 BILLION characters on your machine. If that’s not in error, that’s just amazing.

---

<div class="post-metadata">

**Author:** ![Dale](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dale](https://forum.codeselfstudy.com/u/Dale)\
**Post date:** [January 26, 2020, 8:03am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/22 "2020-01-26T08:03:41Z")

</div>

Out of curiosity, exactly equivalent on my machine:  
± |feature/dale/memoryattempt2 U:5 ✗| → wc -m tags  
44928 tags

2020-01-26 00:02:48 ⌚ dale-G3-3779 in ~/local/game  
± |feature/dale/memoryattempt2 U:5 ✗| → ls -l tags  
-rw-rw-r-- 1 dale dale 44928 Jan 25 23:57 tags

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 26, 2020, 9:53am UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/23 "2020-01-26T09:53:46Z")

</div>

I just tried it in a new Gatsby JS site that I was using to test a Docker setup, and it went from 19 KB to 356 MB as soon as I opened the `gatsby-config.js` file. 😬

![ctags vim 356 MB](https://forum.codeselfstudy.com/uploads/default/original/2X/b/ba9f22b9caeaa29afe6e15d4d79593bd37f66316.png)

I’m guessing that it’s from the dependencies in the `node_modules` directory.

`npm list | grep -v deduped | wc -l` shows 2,097 lines of output.

 ![node_modules](https://forum.codeselfstudy.com/uploads/default/original/2X/5/516be35eb3028ed9cb643f8ff47da9996f2a7e89.png)

---

<div class="post-metadata">

**Author:** ![Dale](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@Dale](https://forum.codeselfstudy.com/u/Dale)\
**Post date:** [January 26, 2020, 4:29pm UTC](https://forum.codeselfstudy.com/t/vim-tips-thread/108/24 "2020-01-26T16:29:13Z")

</div>

Oh node, sigh

That’s amazing. I suppose if you are ctagging into the dependency code you may want to use this.

[Next page](https://forum.codeselfstudy.com/t/vim-tips-thread/108.md?page=2)
