A list of things to remember about my tools.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -sh $(brew --cellar)/* | sort -hr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Move lines easily {{{ | |
-- From https://vim.fandom.com/wiki/Moving_lines_up_or_down. Strange charachters are due to MacOS | |
-- ∆ = A-j | |
-- ˚ = A-k | |
vim.keymap.set("n", "∆", "<cmd>m .+1<CR>==") | |
vim.keymap.set("n", "˚", "<cmd>m .-2<CR>==") | |
vim.keymap.set("i", "∆", "<ESC><cmd>m .+1<CR>==gi") | |
vim.keymap.set("i", "˚", "<ESC><cmd>m .-2<CR>==gi") | |
-- using <cmd>m does not work with this | |
vim.keymap.set("v", "∆", ":m '>+1<CR>gv=gv") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For some reason the correspondant .inputrc code does not work | |
bind TAB:menu-complete | |
bind '"\e[Z":menu-complete-backward' # Shift-TAB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <leader>b <Cmd>echo system("git blame " .. expand("%") .. " -L " .. line(".") .. "," .. line("."))<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
"runtimepath+=/opt/homebrew/share/vim/vim91/pack/ | |
let &packpath = &runtimepath | |
source ~/.vimrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://stackoverflow.com/a/17029936 | |
# git branch -d keeps us on the safe side | |
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gch [] { | |
let branch = git branch | fzf --cycle | tr -d '[:space:]' | |
git checkout $branch | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Re-open the last closed tab. | |
CTRL + SHIFT + t | |
COMMAND + SHIFT + t | |
App: Chrome, Edge, Brave, Firefox | |
Switch to another window of the same program on MacOS | |
COMMAND + ` | |
App: / |
NewerOlder