Skip to content

Instantly share code, notes, and snippets.

View Mr-Jack82's full-sized avatar
💭
Learning to code

Виталий Шевченко Mr-Jack82

💭
Learning to code
  • Russia
View GitHub Profile
@Mr-Jack82
Mr-Jack82 / CapsLockCtrlEscape.ahk
Created May 16, 2023 14:28 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
@Mr-Jack82
Mr-Jack82 / repeat_improved.txt
Created March 9, 2023 16:28
Improve key repeat on MacOS and Linux
mac os need restart
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
linux
xset r rate 210 40
"============================================================================
" statusline
"============================================================================
" statusline settings
let g:currentmode={
\ 'n' : 'NORMAL ',
\ 'v' : 'VISUAL ',
\ 'V' : 'V·Line ',
\ "\<C-V>" : 'V·Block ',
@Mr-Jack82
Mr-Jack82 / cmp.lua
Created March 2, 2023 20:05
Setting up autocomplete with 'nvim-cmp' and 'lazy.nvim' from the ground
return {
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = { "InsertEnter", "CmdlineEnter" },
dependencies = {
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
" ====================================================================
" Make sure to:
" 1. source this file somewhere at the bottom of your config.
" 2. disable any statusline plugins, as they will override this.
" ====================================================================
" Do not show mode under the statusline since the statusline itself changes
" color depending on mode
set noshowmode
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
return {
local feline = require('feline')
local vi_mode = require('feline.providers.vi_mode')
--
-- 1. define some constants
--
-- left and right constants (first and second items of the components array)
local LEFT = 1
local RIGHT = 2
@Mr-Jack82
Mr-Jack82 / space.vim
Last active January 12, 2023 07:33
Color theme for vim-airline
" source of this config is https://github.com/ctaylo21/jarvis
" also read his article "A guide to modern Web Development with (Neo)vim"
" https://www.freecodecamp.org/news/a-guide-to-modern-web-development-with-neo-vim-333f7efbf8e2/
" vim-airline template by chartoin (http://github.com/chartoin)
" Base 16 Oceanic Next Scheme by Chris Kempson (http://chriskempson.com)
" Base 16 Oceanic Next Vim Airline Scheme
" (https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16_oceanicnext.vim)
let g:airline#themes#space#palette = {}
let s:gui00 = "#1b2b34"
if not as then return end
local api, fn = vim.api, vim.fn
as.augroup("TextYankHighlight", {
{
event = "TextYankPost",
pattern = "*",
desc = "highlight text on yank",
command = function()
@Mr-Jack82
Mr-Jack82 / trial.md
Created August 1, 2022 15:44 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare