Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
starifly committed Jan 9, 2025
0 parents commit f73ca88
Show file tree
Hide file tree
Showing 152 changed files with 18,777 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

on: [push, pull_request]

jobs:
vint:
strategy:
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run vint with reviewdog
uses: reviewdog/action-vint@v1
with:
submodules: true
fetch-depth: 0


install-script:
strategy:
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check cpoptions
run: |
sudo apt-get install shellcheck python3.6 -y
shellcheck *.sh
./install.sh
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
language: c

sudo: required
dist: trusty

compiler:
- clang
- gcc

notifications:
email:
recipients:
- ${U_EMAIL}
on_success: never # default: change
on_failure: never # default: always

addons:
apt:
packages:
- shellcheck
- autoconf
- clang
- lcov
- libncurses5-dev
- libgnome2-dev
- libgnomeui-dev
- libgtk2.0-dev
- libatk1.0-dev
- libbonoboui2-dev
- libcairo2-dev
- libx11-dev
- libxpm-dev
- libxt-dev
- python-dev
- python3-dev
- ruby-dev
- lua5.1
- liblua5.1-dev
- tcl-dev
- cscope
- libperl-dev

before_install:
- sudo apt-get update
- sudo apt-get remove --purge vim-tiny vim vim-runtime gvim vim-common vim-gui-common vim-nox
- git clone https://github.com/vim/vim.git
- cd vim
- ./configure --with-features=huge --enable-multibyte --enable-python3interp --enable-perlinterp --enable-luainterp --enable-gui=gtk2 --enable-cscope --prefix=/usr/local
- make
- sudo make install
- vim --version
- cd ../

script:
- shellcheck *.sh
- chmod +x install.sh
- ./install.sh

branches:
only:
- master
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 starifly

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
APP := FlyVim
INIT_VIM := ~/.FlyVim/init.vim
VIMRC := ~/.vimrc
NVIMRC := ~/.config/nvim/init.vim

help:
@echo "usage: make [OPTIONS]"
@echo " help Show this message"
@echo " vim Install FlyVim for Vim"
@echo " neovim Install FlyVim for NeoVim"
@echo " update Update FlyVim"
@echo " uninstall Uninstall FlyVim"

vim:
@echo "\033[1;34m==>\033[0m Trying to install FlyVim for Vim"; \
[ ! -f $(VIMRC) ] && ln -sf $(INIT_VIM) $(VIMRC) && echo " - Created $(VIMRC) "; \
echo "\033[1;34m==>\033[0m Trying to download vim-plug"; \
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim; \
echo "\033[32m[✔]\033[0m Successfully downloaded vim-plug"; \
vim +'PlugInstall' +qall; \
echo "\033[32m[✔]\033[0m Successfully installed $(APP) for Vim!"

neovim:
@echo "\033[1;34m==>\033[0m Trying to install FlyVim for NeoVim"; \
mkdir -p ~/.config/nvim; \
[ ! -f $(NVIMRC) ] && ln -sf $(INIT_VIM) $(NVIMRC) && echo " - Created $(NVIMRC)"; \
echo "\033[1;34m==>\033[0m Trying to download vim-plug"; \
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim; \
echo "\033[32m[✔]\033[0m Successfully downloaded vim-plug"; \
nvim +'PlugInstall' +qall; \
echo "\033[32m[✔]\033[0m Successfully installed $(APP) for NeoVim!"

update:
@echo "\033[1;34m==>\033[0m Trying to update FlyVim"; \
git pull origin master; \
echo "\033[32m[✔]\033[0m Successfully updated $(APP)"

uninstall:
@echo "\033[1;34m==>\033[0m Trying to uninstall FlyVim"; \
rm -f $(VIMRC) && echo " - Removed $(VIMRC)"; \
rm -f $(NVIMRC) && echo " - Removed $(NVIMRC)"; \
rm -rf ~/.$(APP) && echo " - Removed ~/.$(APP)"; \
echo "\033[32m[✔]\033[0m Successfully uninstalled $(APP)"

.PHONY: help vim neovim update uninstall
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<div align="center">
<h1> FlyVim </h1>

<p align="center">
<a href=""><img alt="Linux" src="https://img.shields.io/badge/Linux-%23.svg?style=flat-square&logo=linux&color=FCC624&logoColor=black"></a>
<a href=""><img alt="macOS" src="https://img.shields.io/badge/macOS-%23.svg?style=flat-square&logo=apple&color=000000&logoColor=white"></a>
<a href=""><img alt="Windows" src="https://img.shields.io/badge/Windows-%23.svg?style=flat-square&logo=windows&color=0078D6&logoColor=white"></a>
<a href="https://github.com/starifly/FlyVim/actions"><img alt="Build Status" src="https://github.com/starifly/FlyVim/workflows/ci/badge.svg"></a>
<a href="https://github.com/vim/vim"><img alt="GitHub" src="https://img.shields.io/badge/vim-8.1+-blue.svg"></a>
<a href="https://github.com/starifly/FlyVim/blob/master/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
</p>

<a href="https://github.com/starifly/FlyVim/#Installation">📦 Installation</a>
</div>

## Screenshots

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/nerd-tagbar.png" alt="Nerdtree & Tagbar">
<em>Nerdtree & Tagbar</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/preview.png" alt="Preview">
<em>Preview</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/auto-complete.png" alt="Auto Complete">
<em>Auto Complete</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/syntax-check.png" alt="Syntax Check">
<em>Syntax Check</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/float-term.png" alt="Float Term">
<em>Float Term</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/window-choose.png" alt="Window Choose">
<em>Window Choose</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/F2-search.png" alt="F2 Search">
<em>F2 Search</em>
</p>

<p align="center">
<img src="https://raw.githubusercontent.com/starifly/FlyVim/master/assets/file-search.png" alt="File Search">
<em>File Search</em>
</p>

## Installation

### Prerequisites

- Vim >= 8.1
- python3
- `apt install clang-format gcc cppcheck shfmt shellcheck global universal-ctags ripgrep`
- `pip install ruff yapf`

### Quick Install

```bash
$ bash <(curl -fsSL https://git.io/fAl8K)
```
### Manual

```bash
$ git clone git@github.com:starifly/FlyVim.git ~/.FlyVim
$ cd ~/.FlyVim
$ make vim # install FlyVim for Vim
$ make neovim # install FlyVim for NeoVim
```

## Update

```bash
$ cd .FlyVim
$ make update
```

## Full Installation Guide

<https://github.com/starifly/FlyVim/wiki/Full-Installation-Guide>

## Thanks

This config is based on [vim-init](https://github.com/skywind3000/vim-init), thanks very much!
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-modernist
Binary file added assets/F2-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/auto-complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/file-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/float-term.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/nerd-tagbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/syntax-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/window-choose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions core/UltiSnips/all.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This file contains snippets that are always defined. I personally
# have snippets for signatures and often needed texts

# sligthly lower priority than everything else since specialized versions
# should overwrite. The user needs to adjust her priority in her snippets to
# ~-55 so that other filetypes will still overwrite.
priority -60

##############
# NICE BOXES #
##############
global !p
from vimsnippets import foldmarker, make_box, get_comment_format
endglobal

snippet box "A nice box with the current comment symbol" b
`!p
box = make_box(len(t[1]))
snip.rv = box[0]
snip += box[1]
`${1:content}`!p
box = make_box(len(t[1]))
snip.rv = box[2]
snip += box[3]`
$0
endsnippet

snippet bbox "A nice box over the full width" b
`!p
if not snip.c:
width = int(vim.eval("&textwidth - (virtcol('.') == 1 ? 0 : virtcol('.'))")) or 71
box = make_box(len(t[1]), width)
snip.rv = box[0]
snip += box[1]
`${1:content}`!p
box = make_box(len(t[1]), width)
snip.rv = box[2]
snip += box[3]`
$0
endsnippet

snippet fold "Insert a vim fold marker" b
`!p snip.rv = get_comment_format()[0]` ${1:Fold description} `!p snip.rv = foldmarker()[0]`${2:1} `!p snip.rv = get_comment_format()[2]`
endsnippet

snippet foldc "Insert a vim fold close marker" b
`!p snip.rv = get_comment_format()[0]` ${2:1}`!p snip.rv = foldmarker()[1]` `!p snip.rv = get_comment_format()[2]`
endsnippet

snippet foldp "Insert a vim fold marker pair" b
`!p snip.rv = get_comment_format()[0]` ${1:Fold description} `!p snip.rv = foldmarker()[0]` `!p snip.rv = get_comment_format()[2]`
${2:${VISUAL:Content}}
`!p snip.rv = get_comment_format()[0]` `!p snip.rv = foldmarker()[1]` $1 `!p snip.rv = get_comment_format()[2]`
endsnippet

##########################
# LOREM IPSUM GENERATORS #
##########################
snippet lorem "Lorem Ipsum - 50 Words" b
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
endsnippet

##########################
# VIM MODELINE GENERATOR #
##########################
# See advice on `:help 'tabstop'` for why these values are set. Uses second
# modeline form ('set') to work in languages with comment terminators
# (/* like C */).
snippet modeline "Vim modeline"
vim`!v ':set '. (&expandtab ? printf('et sw=%i ts=%i', &sw, &ts) : printf('noet sts=%i sw=%i ts=%i', &sts, &sw, &ts)) . (&tw ? ' tw='. &tw : '') . ':'`
endsnippet

# vim:ft=snippets:
Loading

0 comments on commit f73ca88

Please sign in to comment.