Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TmuxIde.app: open files in Nvim + Tmux
I've started a project based on Appear's libraries to open files in Nvim +
Tmux. I prefer Tmux and terminal-based programs to GUI editors, so I've always
wanted to set console Vim as my default application for many filetypes.
I've built a proof-of-concept scipt that intelligently opens clicked files in
Nvim sessions inside Tmux windows. We use
Platypus to turn the script into a Mac native
app, and
duti
to assign our new app as the defaulteditor.
This project will eventually be split into its own repo, but lives in Appear
for now.
Set up Neovim:
Follow the
nvr
install instructions. Make sure the binary ends up in/usr/local/bin, /usr/bin, or /bin.
tmux
in /usr/local/bin, too.brew install tmux
if not.bash mkdir -p "$HOME/.vim/sockets/" NVIM_LISTEN_ADDRESS="$HOME/.vim/sockets/vim-zsh-$$.sock"
Without this snippet, we'll be unable to query or control existing nvim sessions.
Build the app:
brew install platypus
, which is the app builderbundle exec rake app
builds into ./build/TmuxIde.appUse it as the default for all of your source code files:
./build/TmuxIde.app. It'll display a dialog and then exit.
brew install duti
, which is a tool we use to change default application for filetypes.bundle exec rake app_defaults
will assign all source code extensions toopen in TmuxIde by default.
If you have any issues with the app, you can
tail -f /tmp/tmux-ide-*.log
toview log messages.
Demo