The usual layout I need is a main window on the left and a secondary on the right, where the main window stays the same and the secondary changes applications. It should also be easy to fullscreen the current window.
This file contains 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
" The (neo)vim function that takes care of navigation within vim. | |
" Same concept as vim-tmux-navigator. If we navigate in the wanted | |
" direction and the winnr() hasn't changed, then we are at the edge | |
" and should forward the navigation to the window manager. | |
function! NvimYabaiNavigate(yabai_direction, vim_direction) | |
let win_nr_before = winnr() | |
execute("wincmd " . a:vim_direction) | |
if win_nr_before ==# winnr() | |
call system("yabai -m window --focus " . a:yabai_direction) |
This file contains 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
" after/ftplugin/erlang.vim | |
setlocal suffixesadd=.erl,.hrl | |
let &l:define = '^-define(\|^-record(\|^-type \|^-type(' | |
let &l:include = '^\s*-include("\zs\f*\ze").$' | |
setlocal path+=path/to/your/code/** |
This file contains 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
" Open the quickfix window in a horizontal split at the bottom | |
" The height is the number of quickfix items (if it fits) | |
command! Copen execute "cclose | botright copen " . len(getqflist()) | |
" Open the quickfix window in a vertical split to the left | |
command! Vcopen execute "cclose | copen | wincmd H" | |
" Add the cfilter plugin to enable the :Cfilter command | |
" This command lets you filter the quickfix list | |
packadd cfilter |
This file contains 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
#!/bin/bash | |
# Compare two directories containing yaml files recursively | |
# Dependencies: | |
# 1. [delta](https://github.com/dandavison/delta) | |
# Inputs: | |
# $1: First directory | |
# $2: Second directory |