Skip to content

Instantly share code, notes, and snippets.

@jerdna-regeiz
Last active June 16, 2021 10:54
Show Gist options
  • Save jerdna-regeiz/be16ca8638d0bba93f6e611a1dd0004f to your computer and use it in GitHub Desktop.
Save jerdna-regeiz/be16ca8638d0bba93f6e611a1dd0004f to your computer and use it in GitHub Desktop.
Use vim anywhere by filling clipboard in i3 (inspired by vim-anywhere)
# uses simple terminal (could be replaced with i3-sensible-terminal)
# replace xclip with the clipboard tool of your choice
# will have last selection as content in the editor per default
bindsym $mod+Ctrl+Return exec "zsh -c 'file=$(mktemp); xclip -o > $file; st -n FloatingST -e vim $file; head -c -1 $file| xclip -se c;'"
for_window [instance="Floating.*"] floating enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment