Skywind wrote:

> One thing important for terminal: open file directly in the terminal
> 
> Presume the shell in the vim's terminal and vim itself are always under the 
> different working directory. It is quite in-productive to switch to 
> terminal-normal mode and use vim's command to find and open a file.
> 
> Emacs can open a file from eshell:
> 
>     ~ $ ls
>     myfile
>     ~ $ (find-file "myfile")
> 
> +clientserver is not always supported.
> 
> This case has been discussed in reddit and can't find a better solution.
> 
> https://www.reddit.com/r/vim/comments/83ve6g/how_to_open_file_in_current_vim_instance_from/
> 
> You will find it is obviously an important feature when you actually used the 
> builtin terminal for 3 days.
> 
> Expecting a nice solution before vim 8.1

There was mention about this before.  In a more general way, we would
want the job running inside the terminal be able to talk back to the Vim
in which the terminal is running.

Currently $VIM_SERVERNAME is passed to the job.  There is an example of
how to use it:

        vim --servername $VIM_SERVERNAME --remote +123 some_file.c

This will open the file "some_file.c" and put the cursor on line 123.

Without the +clientserver feature this doesn't work, and in terminal Vim
the clientserver code is not initialized by default.

An alternative would be to support a custom escape sequence enclosing an
arbitrary Vim command.  This is tricky, since it can be abused to have
Vim execute any command when catting a file to the terminal.
We could restrict it to opening a file, a bit like the :drop command.
That would solve perhaps 90% of the desired functionality.


-- 
hundred-and-one symptoms of being an internet addict:
1. You actually wore a blue ribbon to protest the Communications Decency Act.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui