Code Monkey home page Code Monkey logo

dps-hitori's Introduction

hitori.vim

Plugin similar to neovim-remote and vim-singleton using denops.vim.

Features

It uses denops.vim, so it works cross-platform. Also supports Windows.

Installation

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" });

Requirements

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: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

Example

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:

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

License

Licensed under MIT License.

Copyright (c) 2023 yukimemi

dps-hitori's People

Contributors

github-actions[bot] avatar web-flow avatar yukimemi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.