Skip to content

Instantly share code, notes, and snippets.

@mg979
mg979 / vim.vim
Last active January 17, 2020 05:51
vim syntax file
" Vim reduced (and faster) syntax file
" Language: Vim 8.1 script
" Edits By: Gianmaria Bajo <mg1979@git.gmail.com>
" Base File Author: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Base File Version: 8.0-20
" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
if exists("b:current_syntax")
finish
endif
@mg979
mg979 / import.vim
Last active March 8, 2024 18:30
Import Ultisnips snippets in vim-vsnip
" ========================================================================///
" Description: import UltiSnips snippets as VsCode snippets for vim-vsnip
" File: import.vim
" Author: Gianmaria Bajo <mg1979@git.gmail.com>
" License: MIT
" Created: dom 09 agosto 2020 13:14:35
" Modified: dom 09 agosto 2020 15:33:32
" ========================================================================///
function! import#snippets(ask_confirm) abort
@mg979
mg979 / fuzzyScore.lua
Created January 24, 2021 15:31
Score fuzzy matches
M = {}
function M.score()
local lines = {}
local self = function(x, ...) return vim.fn.get(vim.fn.eval('self'), x, ...) end
local re = function(x, ...) return vim.fn.get(vim.fn.eval('self.re'), x, ...) end
local find = string.find
local vmatch = vim.fn.match
local vmatchend = vim.fn.matchend
@mg979
mg979 / virtualSep.vim
Last active April 2, 2021 22:28
Virtual text separators for neovim
" ========================================================================///
" Description: separators using virtual text for nvim
" File: virtualSep.vim
" Author: Gianmaria Bajo <mg1979.git@gmail.com>
" License: MIT
" Created: ven 02 aprile 2021 09:58:06
" ========================================================================///
" GUARD {{{1
if !has('nvim') || exists('g:loaded_virtualSep')
@mg979
mg979 / sl.vim
Last active September 1, 2021 13:31
Statusline in vim9script
" _____ __ __ __ _
" / ___/ / /_ ____ _ / /_ __ __ _____ / / (_) ____ ___
" \__ \ / __/ / __ `/ / __/ / / / / / ___/ / / / / / __ \ / _ \
" ___/ / / /_ / /_/ / / /_ / /_/ / (__ ) / /___ / / / / / // __/
" /____/ \__/ \__,_/ \__/ \__,_/ /____/ /_____//_/ /_/ /_/ \___/
" GUARD {{{1
if v:version < 802 || exists('g:loaded_statusline')
finish
endif
" ========================================================================///
" Description: simple bookmarks system using uppercase marks and quickfix
" File: projectmarks.vim
" Author: Gianmaria Bajo <mg1979.git@gmail.com>
" Credits: https://www.reddit.com/r/vim/comments/pngb4j/what_is_the_best_way_to_manage_bookmarks_per/
" License: MIT
" Created: mer 15 settembre 2021 17:00:32
" Modified: mer 15 settembre 2021 17:00:32
" ========================================================================///