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
# 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 | |
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
function! Toggle_Surround(char) | |
let pos = getcurpos() | |
let cur = col(".") | |
exe "norm! va".a:char | |
let start = col("v") | |
let end = col(".") | |
exe "norm! \<esc>" | |
call cursor(pos[1], pos[2]) | |
if start <= cur && cur <= end && start != end | |
" inside quote :) |