Skip to content

Instantly share code, notes, and snippets.

View ur4ltz's full-sized avatar

Andy Shevchenko ur4ltz

  • Kharkiv - Ukraine, Glory to Ukraine
View GitHub Profile
@progfolio
progfolio / general-spacemacs.org
Last active March 20, 2024 17:04
Spacemacs-like menus using general.el

Spacemacs-like menus using general.el

Global keybindings

First, we define a global prefix key:

(general-create-definer global-definer
  :keymaps 'override
  :states  '(insert emacs normal hybrid motion visual operator)
  :prefix  "SPC"
  :non-normal-prefix "S-SPC")
@agnoster
agnoster / README.md
Last active March 14, 2024 15:54
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@romainl
romainl / vanilla-linter.md
Last active March 8, 2024 18:30
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

@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
@kylechui
kylechui / dot-repeating.md
Last active March 7, 2024 20:47
A basic overview of how to manage dot-repeating in your Neovim plugin, as well as manipulate it to "force" what action is repeated.

Adding dot-repeat to your Neovim plugin

In Neovim, the . character repeats "the most recent action"; however, this is not always respected by plugin actions. Here we will explore how to build dot-repeat support directly into your plugin, bypassing the requirement of dependencies like repeat.vim.

The Basics

When some buffer-modifying action is performed, Neovim implicitly remembers the operator (e.g. d), motion (e.g. iw), and some other miscellaneous information. When the dot-repeat command is called, Neovim repeats that operator-motion combination. For example, if we type ci"text<Esc>, then we replace the inner contents of some double quotes with text, i.e. "hello world""text". Dot-repeating from here will do the same, i.e. "more samples""text".

Using operatorfunc

@ctechols
ctechols / compinit.zsh
Last active March 6, 2024 08:37
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active March 6, 2024 08:07
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@nezuo
nezuo / testez-selene.md
Last active March 3, 2024 14:17
TestEZ standard library for selene

Instructions

  1. Copy the file below into one called testez.yml
  2. In selene.toml, replace std = "roblox" with std = "roblox+testez"
(setq show-paren-style 'expression)
(show-paren-mode 2)
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq make-backup-files nil) ; Don't want any backup files
(setq auto-save-list-file-name nil) ; Don't want any .saves files
(setq auto-save-default nil) ; Don't want any auto saving