最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to setup sublime 3 with react native so that when you click on the error and it jump to your code? - Stack Over

programmeradmin2浏览0评论

How to setup sublime 3 with react native? it say add "add something like
REACT_EDITOR=atom to your .bashrc".

Where can add or edit REACT_EDITOR?

PRO TIP

When you see Red Box with stack trace, you can click any stack frame to jump to the source file. The packager will launch your editor of choice. It will first look at REACT_EDITOR environment variable, then at EDITOR. To set it up, you can add something like REACT_EDITOR=atom to your .bashrc.

How to setup sublime 3 with react native? it say add "add something like
REACT_EDITOR=atom to your .bashrc".

Where can add or edit REACT_EDITOR?

PRO TIP

When you see Red Box with stack trace, you can click any stack frame to jump to the source file. The packager will launch your editor of choice. It will first look at REACT_EDITOR environment variable, then at EDITOR. To set it up, you can add something like REACT_EDITOR=atom to your .bashrc.

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Sep 27, 2015 at 9:39 phongyewtongphongyewtong 5,31915 gold badges59 silver badges87 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

I got the same idea as you think of. You can do following:

1.We should make sure that sublime can be used in terminal mand. So firstly we make the sublime terminal mand.

sudo rm -rf /usr/local/bin/subl

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin

then we run subl sublime.txt you will find it works.

  1. We should change the .bashrc or .zshrc (if you has installed the oh my zsh) by adding

export REACT_EDITOR=subl

3.We restart the terminal and run react native project then click the error message. Amazing things will happen : ) have fun!

Assuming you are using oh-my-zsh and have already created a symbolic link from subl to sublime and have vim installed:

> vim ~/.zshrc

add:

export REACT_EDITOR=sublime

reload .zshrc:

> source ~/.zshrc

restart app: (example for iOS)

> react-native run-ios

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论