Skip to content

Instantly share code, notes, and snippets.

@equalsraf
equalsraf / neovim_system_string.md
Last active November 5, 2023 17:46
Notes on neovim system('...') in Windows for #6359

Vim's system('string') interface is not always straightforward in Windows, its behaviour can be downright unexpected involves an intricate set of options. Its primary purpose its to execute a command in the shell (see &shell) in simple terms we can think that calling system('some command') is equivalent to spawning a process with the following arguments

[&shell, &shellcmdflag, 'some command']

and sometimes this might be true but it also might not. Consider the following examples (I'm running in gVim 7.4/Windows 8)

@equalsraf
equalsraf / windows-nvim-build.md
Last active November 10, 2021 09:54
New instructions for building nvim in Windows

[WIP]

Windows/MSYS2

In Windows we build using the toolchain provided by MSYS2 - the resulting binaries DO NOT link against the MSYS2 runtime.

Start by installing the necessary dependencies

@equalsraf
equalsraf / NeovimCygwin.md
Last active May 14, 2021 11:42
Neovim in Cygwin

TLDR; no, libuv doesn't work in Cygwin just yet, see at the bottom.

Requirements

I tested using the master branch (9d3449852bd35c9283948186d0259c1bf73b8579 or later)

I installed the following in the cygwin setup

  • gcc-c++ make cmake pkg-config libtool
@equalsraf
equalsraf / win-neovim-src-2018.md
Last active March 13, 2021 14:45
Its 2018 lets build neovim from source in windows

It's been a while since I did this, so .... lets see what happens.

For starters we have this setup

  • Windows 10 64 bit
  • using VS code (with some cmake and C++/C extensions installed)
  • installed cmake manually
  • I'm doing this off two different computers, so these notes will not have output :S

Just to establish that we have everything we need to build neovim, I'm going to take the long route using cmake

@equalsraf
equalsraf / gist:c52c2261ff3671ccbd32
Last active January 2, 2020 02:17
Cross Compile Neovim

Before you start you need a Mingw-w64 toolchain for Linux, try installing the mingw-w64 package (Ubuntu, Suse, Fedora?) or get it from the Mingw-w64 website.

Build dependencies

$ mkdir deps-mingw
$ cd deps-mingw
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32-w64-cross-travis.toolchain.cmake ../third-party/
$ make
$ cd ..
@equalsraf
equalsraf / notes.md
Last active February 6, 2019 00:58
Why cant I use clipboard with remote nvim or why is 298 still open?

So we still have some issues with the GUI clipboard.

My hypothesis is that because nvim is caching the has_clipboard static variable then the clipboard will always be considered as invalid and can NEVER be enabled.

Test setup

First I'm going to start nvim in a way that prevents any clipboard for working by changing the PATH.

@equalsraf
equalsraf / gist:4685f7aef022a36c26d5
Last active November 15, 2017 22:13
Building Neovim with MSVC 2015

Check the pull request for the changes and the main issue for discussion. If you run into trouble check the Known Errors section at the end, or drop me a comment.

Requirements

  • MSVC 2015, cl should report > 19.*
  • Python 2 (required by libuv to get gyp) - python 3 will not work, see the issue
  • Git (required by libuv to get gyp)
  • libintl
  • You might need the Windows 10 SDK to be installed (unverified, please drop me a comment in #810, specially if you are in Windows8 or lower.)
@equalsraf
equalsraf / nvim-openbsd62.md
Last active October 27, 2017 17:19
some issues building neovim in openbsd 6.2

cmake fails to find a usable lua

... even if packages for lua and all deps(mpack, bitop, lpeg) are installed. This seems to be a problem with the lua binary name in OpenBSD its called lua51, lua52, luajit51 - instead of the expected lua5.1 or just lua.

The workaround for this is to specify the binary

@equalsraf
equalsraf / neovim-escaping.md
Last active October 16, 2017 04:48
Figuring out neovim windows escaping issues

The problem

I thought this was fixed earlier, but the following fails to execute if shell=cmd.exe

:echo system('cd /d "c:\Windows"')

Take the following script

@equalsraf
equalsraf / neovim-haiku.md
Last active October 8, 2017 09:44
Try to build neovim in haiku

TLDR; it did not work, apparently the major blocker is libuv support

1. dependencies (i.e. nvim's third-party/)

Haiku already has some deps, lets use its packages. But for libvterm, etc we need to use third-party

mkdir .deps
cd .deps