Plugin similar to neovim-remote and vim-singleton using denops.vim.
It uses denops.vim, so it works cross-platform. Also supports Windows.
If you use folke/lazy.nvim.
{
"yukimemi/hitori.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
If you use yukimemi/dvpm.
dvpm.add({ url: "yukimemi/hitori.vim" });
- Deno - A modern runtime for JavaScript and TypeScript
- vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
No special settings are required. By default, Start a websocket server on port 7070.
:Disablehitori
Disable hitori.
:Enablehitori
Enable hitori.
No settings are required. However, the following settings can be made if necessary.
g:hitori_debug
Enable debug messages.
default is v:false
g:hitori_opener
Configure how files are opened.
default is "tab drop"
g:hitori_quit
Whether to quit after sending a file to an already open server-side Vim/Neovim.
default is v:true
g:hitori_ignore_patterns
A list of patterns to be ignored. (JavaScript regexp)
default is ["\.tmp$", "\.diff$", "(COMMIT_EDIT|TAG_EDIT|MERGE_|SQUASH_)MSG$"]
g:hitori_port
Websocket server port.
default is 7070
g:hitori_wsl
Enable this setting if you want to automatically convert the path and open it even in wsl -> windows / windows -> wsl.
default is v:false
Websocket communication needs to pass between windows and wsl. In the case of the latest wsl2, this is possible by performing the following settings.
[wsl2]
networkingMode=mirrored
let g:hitori_debug = v:false
let g:hitori_quit = v:false
let g:hitori_port = 7070
let g:hitori_opener = "vsplit"
let g:hitori_wsl = v:true
let g:hitori_ignore_patterns = ["\\.tmp$", "\\.diff$", "(COMMIT_EDIT|TAG_EDIT|MERGE_|SQUASH_)MSG$"]
Before starting Neovim, you can use the hitori
command to check if the WebSocket server is already running, and if it is, directly send the path of the argument via the WebSocket, otherwise start Neovim.
To use nvim
, use the following command:
deno install --force --allow-net --allow-run --allow-read --name hitori https://raw.githubusercontent.com/yukimemi/hitori.vim/main/cmd/hitori_nvim.ts
To use nvim-qt
, use the following command:
deno install --force --allow-net --allow-run --allow-read --name hitori https://raw.githubusercontent.com/yukimemi/hitori.vim/main/cmd/hitori_nvim-qt.ts
To use neovide
, use the following command:
deno install --force --allow-net --allow-run --allow-read --name hitori https://raw.githubusercontent.com/yukimemi/hitori.vim/main/cmd/hitori_neovide.ts
Licensed under MIT License.
Copyright (c) 2023 yukimemi