Skip to content

Instantly share code, notes, and snippets.

@mg979
mg979 / virtualSep.vim
Last active Apr 2, 2021
Virtual text separators for neovim
View virtualSep.vim
" ========================================================================///
" 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 / fuzzyScore.lua
Created Jan 24, 2021
Score fuzzy matches
View fuzzyScore.lua
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 / import.vim
Last active May 4, 2021
Import Ultisnips snippets in vim-vsnip
View import.vim
" ========================================================================///
" 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 / vim.vim
Last active Jan 17, 2020
vim syntax file
View vim.vim
" 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