Skip to content

Instantly share code, notes, and snippets.

@dvtalk
Last active January 24, 2021 14:19
Show Gist options
  • Select an option

  • Save dvtalk/7a1776737f4302b3ed7b71b68fce1b35 to your computer and use it in GitHub Desktop.

Select an option

Save dvtalk/7a1776737f4302b3ed7b71b68fce1b35 to your computer and use it in GitHub Desktop.
Use when inside vim terminal, sh script to send file from vim terminal to open in current vim.
#!/bin/sh
pathdir="$( pwd )"
if [ -e ./$1 ]; then
pathdir="${pathdir}/${1}"
elif [ -e $1 ]; then
pathdir=$1
else
pathdir="${pathdir}/${1}"
fi
printf "]51;[\"drop\", \"$pathdir\"]"
# https://dvtalk.me/2020/08/15/using-vim-terminal/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment