Please tell me how to start Vim as a daemon.

Asked 2 years ago, Updated 2 years ago, 124 views

I'm looking for a way to start Vim as a daemon.
Always start the Vim process and
when accessing from the terminal I would like to use the same process vim every time.

The reason is that I use the plug-in of Vim, jedi-vim, but
If you supplement a large library such as numpy each time, initialization will run and you will have to wait for a while.
It seems to be cached in memory from the second time, so it's good that it's very fast. If you accidentally close the Vim, it will be loaded again when it is restarted, which is troublesome.
I would like to solve this problem by daemonizing Vim.

I checked various things and found that emacs can be daemonized, so
I would like to do the same with Vim.
- Demonizing emacs is super convenient - http://d.hatena.ne.jp/tkng/20090203/1233662327
- Use with emacs daemon - Qiita http://qiita.com/yukifrog/items/5928f434c3342c9cab4d

Thank you for your cooperation.

vim

2022-09-30 21:24

2 Answers

Demonization means that you have to separate tty and create a new virtual terminal to communicate with connected clients, but Vim does not have an implementation to daemonize.
I think it is possible to start Vim there using tmux.


2022-09-30 21:24

Can't I use vim server mode?

This feature is available if compiled by +clientserver, and if the result of vim--serverlist exists, vim--remote opens the file in a vim that is already started.
If the result of vim--serverlist does not exist, you should start Vim as vim--servername VIM in advance.

See :help clientserver for more information.


2022-09-30 21:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.