Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yukimemi/hitori.vim
https://github.com/yukimemi/hitori.vim
deno denops neovim neovim-plugin remote vim vim-denops vim-plugin
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yukimemi/hitori.vim
- Owner: yukimemi
- Created: 2022-11-24T13:07:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T11:16:55.000Z (5 months ago)
- Last Synced: 2024-09-08T13:02:16.065Z (5 months ago)
- Topics: deno, denops, neovim, neovim-plugin, remote, vim, vim-denops, vim-plugin
- Language: TypeScript
- Homepage:
- Size: 470 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hitori.vim
Plugin similar to [neovim-remote](https://github.com/mhinz/neovim-remote) and [vim-singleton](https://github.com/thinca/vim-singleton) using [denops.vim](https://github.com/vim-denops/denops.vim).
# Features
It uses [denops.vim](https://github.com/vim-denops/denops.vim), so it works cross-platform.
Also supports Windows.# Installation
If you use [folke/lazy.nvim](https://github.com/folke/lazy.nvim).
```lua
{
"yukimemi/hitori.vim",
lazy = false,
dependencies = {
"vim-denops/denops.vim",
},
}
```If you use [yukimemi/dvpm](https://github.com/yukimemi/dvpm).
```typescript
dvpm.add({ url: "yukimemi/hitori.vim" });
```# Requirements
- [Deno - A modern runtime for JavaScript and TypeScript](https://deno.land/)
- [vim-denops/denops.vim: 🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno](https://github.com/vim-denops/denops.vim)# Usage
No special settings are required.
By default, Start a websocket server on port 7070.# Commands
`:Disablehitori`
Disable hitori.`:Enablehitori`
Enable hitori.# Config
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:falseWebsocket communication needs to pass between windows and wsl.
In the case of the latest wsl2, this is possible by performing the following settings.```ini
[wsl2]
networkingMode=mirrored
```# Example
```vim
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$"]
```# hitori cli command
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:
```shell
deno install --force --global --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:
```shell
deno install --force --global --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:
```shell
deno install --force --global --allow-net --allow-run --allow-read --name hitori https://raw.githubusercontent.com/yukimemi/hitori.vim/main/cmd/hitori_neovide.ts
```# License
Licensed under MIT License.
Copyright (c) 2023 yukimemi