Skip to content

Instantly share code, notes, and snippets.

@AGou-ops
Created July 17, 2023 02:41
Show Gist options
  • Save AGou-ops/2b3515d84c7adda1e30811ecec1abef5 to your computer and use it in GitHub Desktop.
Save AGou-ops/2b3515d84c7adda1e30811ecec1abef5 to your computer and use it in GitHub Desktop.
Build neovim nightly. (for nvim-ufo)
#!/bin/bash
#
#**************************************************
# Author: AGou-ops *
# E-mail: agou-ops@foxmail.com *
# Date: 2023-07-17 *
# Description: *
# Copyright 2023 by AGou-ops.All Rights Reserved *
#**************************************************
#
set -euxo pipefail
nightly_release="https://github.com/neovim/neovim/archive/refs/tags/nightly.tar.gz"
/opt/homebrew/bin/trash-put ~/GitHub_workspace/neovim* || echo
rm -rf ~/GitHub_workspace/neovim* || echo
curl -o ~/GitHub_workspace/neovim-nightly.tar.gz -L $nightly_release
cd ~/GitHub_workspace/
tar xf neovim-nightly.tar.gz
cd neovim-nightly
#
# } else if (first_level == 1) {
# symbol = wp->w_p_fcs_chars.foldsep;
# } else if (first_level + i <= 9) {
# symbol = '0' + first_level + i;
# } else {
# symbol = '>';
start_line=$(awk '/else if \(first_level == 1\)/ {print NR}' src/nvim/drawline.c)
end_line=$(($start_line + 3))
sed -i '' "${start_line},${end_line}d" src/nvim/drawline.c
replace_line=$(($start_line + 1))
sed -i '' "${replace_line}s@.*@ symbol = wp->w_p_fcs_chars.foldsep;@" src/nvim/drawline.c
make CMAKE_BUILD_TYPE=Release
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment