如何使用 React Native 设置 sublime 3?它说添加“添加类似
REACT_EDITOR=atom 到您的 .bashrc”。
在哪里可以添加或编辑 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.
最佳答案
我和你的想法一样。您可以执行以下操作:
1.我们应该确保sublime可以在终端命令中使用。所以首先我们制作 sublime 终端命令。
sudo rm -rf/usr/local/bin/subl
sudo ln -s/Applications/Sublime\Text.app/Contents/SharedSupport/bin/subl/usr/local/bin
然后我们运行 subl sublime.txt
你会发现它有效。
- 我们应该更改
.bashrc
或.zshrc
(如果您安装了 oh my zsh),添加
export REACT_EDITOR=subl
3.我们重启终端,运行react native project,然后点击报错信息。奇妙的事情将会发生 :) 玩得开心!
关于javascript - 如何使用 React Native 设置 Sublime 3,以便当您单击错误并跳转到您的代码时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32806509/