Skip to content

Instantly share code, notes, and snippets.

@EgZvor
EgZvor / jumpfile.vim
Created November 8, 2021 18:22
Vim mappings to jump through jumplist by files
if exists('g:loaded_jumpfile')
finish
endif
let g:loaded_jumpfile = 1
function! JumpFileComputePrevious()
let [jump_list, pos] = getjumplist()
let previous_list = jump_list
\ ->map({idx, val -> [idx, val]})[:pos]
@numToStr
numToStr / au.lua
Last active August 20, 2023 05:15
Neovim autocmd in lua
--
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
--
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then
@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active May 1, 2023 18:05
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
@ahmedelgabri
ahmedelgabri / statusline.vim
Last active September 13, 2022 13:15
Trying to build my vim statusline without plugins
" Statusline & Tabline/Buffer line
" Dynamically getting the fg/bg colors from the current colorscheme, returns hex which is enough for me to use in Neovim
" Needs to figure out how to return cterm values too
let fgcolor=synIDattr(synIDtrans(hlID("Normal")), "fg", "gui")
let bgcolor=synIDattr(synIDtrans(hlID("Normal")), "bg", "gui")
" Tabline/Buffer line
set showtabline=2
set tabline="%1T"