Git Product home page Git Product logo

open-with-nvim's Introduction

open-with-nvim

Introduction

A simple wrapper to set Neovim as the default application on Windows for text files with support for opening files in tabs instead of in separate windows.

Simply setting the nvim.exe executable as the default application will open a new instance of Neovim for each file, whereas open-with-nvim allows for all files opened through File Explorer to spawn within a single instance of Neovim.

This allows Neovim to inherit the tab functionality of Windows Notepad whilst remaining completely within the terminal.

open-with-nvim is NOT a GUI, just a wrapper which sends commands to the terminal.

Installation

  1. Install the open-with-nvim.exe executable from the lastest Release or compile from source.

  2. Place the executable inside %LocalAppData%\nvim-data\.

    open-with-nvim.exe is a standalone executable and can actually be placed anywhere, %LocalAppData%\nvim-data\ is just a reccomendation.

  3. Set the executable as the default app for the file types you would like.

open-with-nvim's People

Contributors

berkay-yalin avatar

Watchers

 avatar

open-with-nvim's Issues

remove python dependency

A new Process is spawned to call a python command whenever the program needs to interacts with the NVIM API.

This is extremely inefficient code which should be rewritten as soon as possible.

Process process = new();
process.StartInfo.FileName = "python.exe";
process.StartInfo.Arguments = "-c \"import pynvim; nvim=pynvim.attach('socket', path=r'\\\\.\\pipe\\nvim');" + " nvim.command(r'tabnew " + filePath + "'); nvim.close();\"";
process.StartInfo.CreateNoWindow = true;
process.Start();

There is an official .NET Client for Neovim, nvim.net, but it is quite outdated.

create file icons

  • Create and set icon for open-with-nvim.exe executable.
  • Set icons for files which have open-with-nvim.exe set as the default application.

doesn't always set cwd to parent directory

When a file is opened the current working directory isn't always set to the parent directory.

For example:

  • When a file already has open-with-nvim.exe as the default application, and is opened traditionally via double-clicking on the file, the current working directory is set to the opened file's parent directory as expected.

  • When a file is opened using the Open with option in the File Explorer context menu for example, the current working directory is set to C:\WINDOWS\system32.

open-with-nvim.exe should always set the current working directory to the parent directory of the opened file.

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.