简体   繁体   中英

Open file with vim but keep the terminal open as well?

Is there a way to open a new vim file in basically a new terminal window(urxvt) ?

For example if I am currently in ~/X/Y.txt and I write
vim --new-window(basically the command needed to open a new window) Y.txt

I still want my current urxvt session while opening the Y.txt in a vim-Session.

gvim将在GUI中(即不在终端中)打开vim。

You can use vim's client-server model. Run one instance as a server and edit files with option --remote .

Another solution would be to use terminal multiplexors like GNU screen , tmux or such.

Other variants are: use a terminal with tabs, use gvim.

I highly, highly, strongly recommend downloading NERDTree . It makes your Vim terminal look (relatively, comparatively) similar to a "normal" IDE, with a narrow file-and-folder bar on the left side, and a "main" terminal window taking up the rest of the screen. You use Ctrl+W to navigate back and forth between the two screens. Plus, in the sidebar, you can use normal Vim commands to move up and down. Whoever created that plugin put a lot of work into it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM