score:2

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

score: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 command. So firstly we make the sublime terminal command.

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!

enter image description here


Related Query

More Query from same tag