{"id":13682532,"url":"https://github.com/Ivo-Donchev/vim-react-goto-definition","last_synced_at":"2025-04-30T09:33:00.521Z","repository":{"id":126855471,"uuid":"135811118","full_name":"Ivo-Donchev/vim-react-goto-definition","owner":"Ivo-Donchev","description":"Goto definition pluigin for React JS written in Python","archived":false,"fork":false,"pushed_at":"2019-01-05T11:51:55.000Z","size":192,"stargazers_count":20,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T23:07:38.585Z","etag":null,"topics":["goto-definition","javascript","plugin","react-js","reactjs","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ivo-Donchev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-02T11:12:30.000Z","updated_at":"2023-10-26T16:09:48.000Z","dependencies_parsed_at":"2023-06-18T08:00:41.841Z","dependency_job_id":null,"html_url":"https://github.com/Ivo-Donchev/vim-react-goto-definition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivo-Donchev%2Fvim-react-goto-definition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivo-Donchev%2Fvim-react-goto-definition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivo-Donchev%2Fvim-react-goto-definition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivo-Donchev%2Fvim-react-goto-definition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ivo-Donchev","download_url":"https://codeload.github.com/Ivo-Donchev/vim-react-goto-definition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224206093,"owners_count":17273389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["goto-definition","javascript","plugin","react-js","reactjs","vim"],"created_at":"2024-08-02T13:01:47.571Z","updated_at":"2024-11-12T02:30:58.134Z","avatar_url":"https://github.com/Ivo-Donchev.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Goto definition plugin for React JS \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/9/9f/Vimlogo.svg\" width=\"48\"\u003e \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/a/a7/React-icon.svg\" width=\"48\"\u003e\n\n# Overview\n\nA python powered vim plugin for goto defintion functionality for functions/components/constants... handling *imports* and *exports* for `Javascript` and especially `React JS`.\nThe implementation is entirely written in Python 3 using regular expressions.\n\nCovered import types:\n\n - relative imports (`import Something from '../components/Something'`) - will search for any of:\n   - '../components/Something.jsx' or\n   - '../components/Something.js' or\n   - '../components/Something/index.js' or\n   - '../components/Something/index.jsx'\n\n - absolute imports (`import Page1 from 'pages/Page1'`) - will search into **src/** folder for the import:\n   - 'src/pages/Page1.jsx' or\n   - 'src/pages/Page1.js' or\n   - 'src/pages/Page1/index.js' or\n   - 'src/pages/Page1/index.jsx'\n\n - default imports (`import A from './A'` or `import {default as A} from './A'`) and non-default imports (`import {a, b as c} from 'module')`)\n\nCovered definition types:\n  - `class \u003c...\u003e`\n  - `function \u003c...\u003e`\n  - `function* \u003c...\u003e`\n  - `\u003c...\u003e = ` - for variables, constants and arrow functions\n\nSearching algorythm works as follows:\n\n  1. Soft scraping:\n      - Search in current file\n      - Search for import\n      - Search for export from another file\n\n  2. Hard scraping (if soft scraping fails :( ) - searches for wanted definition over the whole project\n\n\n# Installation\n\n### Vundle\n\nAdd the following line to your `~/.vimrc` :\n```\nPlugin 'Ivo-Donchev/vim-react-goto-definition'\n```\nand run:\n\n```\n:PluginInstall\n```\n\n# Usage\n\nSet you cursor on the imported function/component and type:\n\n```\n:call ReactGotoDef()\n```\n\nYou can also map this function call with:\n\n```\n\" To map to \u003cleader\u003eD:\nnoremap \u003cleader\u003eD :call ReactGotoDef()\u003cCR\u003e\n```\n\n**NOTE**: Your vim needs to support python3+ scripting. You can check this with:\n\n```\n:python3 print('ReactJS')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIvo-Donchev%2Fvim-react-goto-definition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIvo-Donchev%2Fvim-react-goto-definition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIvo-Donchev%2Fvim-react-goto-definition/lists"}