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
# Save this file to ~/.config/fish/functions/push-line.fish | |
# Bind the function by using this in ~/.config/fish/functions/fish_user_key_bindings.fish | |
# function fish_user_key_bindings | |
# # For example alt+q | |
# bind \eq push-line | |
# end | |
function push-line | |
# Add an event handler for fish_postexec |
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
;;; company-simple-complete.el --- Vim-like completion style | |
;; Package-Requires: ((company)) | |
;;; Commentary: | |
;; Modify company so that tab and S-tab cycle through completions without | |
;; needing to hit enter. | |
;;; 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
# Search shell history with peco: https://github.com/peco/peco | |
# Adapted from: https://github.com/mooz/percol#zsh-history-search | |
if which peco &> /dev/null; then | |
function peco_select_history() { | |
local tac | |
{ which gtac &> /dev/null && tac="gtac" } || \ | |
{ which tac &> /dev/null && tac="tac" } || \ | |
tac="tail -r" | |
BUFFER=$(fc -l -n 1 | eval $tac | \ | |
peco --layout=bottom-up --query "$LBUFFER") |