Skip to content

Conversation

@lencioni
Copy link
Contributor

This suffixesadd setting helps Vim understand text that references a
path and does not contain the .js extension, as is often the case in
CommonJS style require statements. This improves motions like gf and
commands like :find. More information:

http://usevim.com/2013/01/04/vim101-jumping/

This suffixesadd setting helps Vim understand text that references a
path and does not contain the .js extension, as is often the case in
CommonJS style require statements. This improves motions like `gf` and
commands like `:find`. More information:

  http://usevim.com/2013/01/04/vim101-jumping/
goatslacker added a commit that referenced this pull request Apr 26, 2015
Add `setlocal suffixesadd+=.js` to ftplugin
@goatslacker goatslacker merged commit d483970 into pangloss:develop Apr 26, 2015
@goatslacker
Copy link
Collaborator

Thanks for these!

@davidchambers
Copy link
Collaborator

I didn't know about gf. Thanks, @lencioni!

@lencioni
Copy link
Contributor Author

No problem!

Depending on the project you are in, it might take a little extra config to tell vim what paths to look in. In a Rails project, for instance, you might want to do something like this: :set path+=app/assets/javascripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants