All Projects → Ivo-Donchev → vim-react-goto-definition

Ivo-Donchev / vim-react-goto-definition

Licence: other
Goto definition pluigin for React JS written in Python

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to vim-react-goto-definition

amazon-ivs-ecommerce-web-demo
This repository shows how you can build a compelling eCommerce experience with Amazon IVS.
Stars: ✭ 19 (+5.56%)
Mutual labels:  react-js
amazon-ivs-simple-chat-web-demo
⚠️ IMPORTANT ⚠️ This repository is no longer actively maintained and will be archived at the end of 2022. A basic live chat implementation built with WebSockets, that can be used in conjunction with Amazon IVS to build compelling customer experiences for live video streams with chat use cases.
Stars: ✭ 53 (+194.44%)
Mutual labels:  react-js
portfolio-react
A portfolio website built with react js
Stars: ✭ 108 (+500%)
Mutual labels:  react-js
explorer
OONI Explorer: uncover evidence of internet censorship worldwide
Stars: ✭ 45 (+150%)
Mutual labels:  react-js
Recess
🤓 Recess - A Social Media Platform for students to share their experience/knowledge they gained in their free time. 🧐
Stars: ✭ 43 (+138.89%)
Mutual labels:  react-js
Oud
🎵 The frontend of Oud, an online music streaming service that is a mimic of Spotify with all its functionalities built using ReactJS, React-Router, Bootstrap.
Stars: ✭ 48 (+166.67%)
Mutual labels:  react-js
react-micro-blog
🛠🛠🛠 A Simple Front-end React Application which Acts as a Complete Blog 🛠🛠🛠
Stars: ✭ 28 (+55.56%)
Mutual labels:  react-js
imrc-datetime-picker
(Improved) React component datetime picker by momentjs 📆
Stars: ✭ 21 (+16.67%)
Mutual labels:  react-js
react-auth-kit
Easily manage Authentication state of users in React-based Apps using Hooks and Higher-order components
Stars: ✭ 177 (+883.33%)
Mutual labels:  react-js
mern-ecommerce
MERN Stack ecommerce site
Stars: ✭ 122 (+577.78%)
Mutual labels:  react-js
developerIdentity
Developers Identity(Portfolio) Template that helps you showcase your work and skills as a software developer.
Stars: ✭ 21 (+16.67%)
Mutual labels:  react-js
amazon-ivs-ugc-web-demo
This repository shows how you can build a compelling user-generated content (UGC) live streaming webapp with Amazon IVS.
Stars: ✭ 14 (-22.22%)
Mutual labels:  react-js
react-list-component
Implementation of different list components in React.
Stars: ✭ 30 (+66.67%)
Mutual labels:  react-js
Dazzle
🚀 Dashboards made easy in React JS.
Stars: ✭ 1,424 (+7811.11%)
Mutual labels:  react-js
harshhhdev.github.io
Harsh Singh's personal blog and portfolio ⚡ built with Next.js
Stars: ✭ 23 (+27.78%)
Mutual labels:  react-js
react-client-sdk
LaunchDarkly Client-side SDK for React.js
Stars: ✭ 42 (+133.33%)
Mutual labels:  react-js

Goto definition plugin for React JS

Overview

A python powered vim plugin for goto defintion functionality for functions/components/constants... handling imports and exports for Javascript and especially React JS. The implementation is entirely written in Python 3 using regular expressions.

Covered import types:

  • relative imports (import Something from '../components/Something') - will search for any of:

    • '../components/Something.jsx' or
    • '../components/Something.js' or
    • '../components/Something/index.js' or
    • '../components/Something/index.jsx'
  • absolute imports (import Page1 from 'pages/Page1') - will search into src/ folder for the import:

    • 'src/pages/Page1.jsx' or
    • 'src/pages/Page1.js' or
    • 'src/pages/Page1/index.js' or
    • 'src/pages/Page1/index.jsx'
  • default imports (import A from './A' or import {default as A} from './A') and non-default imports (import {a, b as c} from 'module'))

Covered definition types:

  • class <...>
  • function <...>
  • function* <...>
  • <...> = - for variables, constants and arrow functions

Searching algorythm works as follows:

  1. Soft scraping:

    • Search in current file
    • Search for import
    • Search for export from another file
  2. Hard scraping (if soft scraping fails :( ) - searches for wanted definition over the whole project

Installation

Vundle

Add the following line to your ~/.vimrc :

Plugin 'Ivo-Donchev/vim-react-goto-definition'

and run:

:PluginInstall

Usage

Set you cursor on the imported function/component and type:

:call ReactGotoDef()

You can also map this function call with:

" To map to <leader>D:
noremap <leader>D :call ReactGotoDef()<CR>

NOTE: Your vim needs to support python3+ scripting. You can check this with:

:python3 print('ReactJS')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].