Last active
May 18, 2017 17:25
-
-
Save noromanba/c3a37e6908a0d71441a7f2526b643474 to your computer and use it in GitHub Desktop.
(Fcitx) XIM Frontend On The Spot workaround for GVim e.g. Browser textarea Extension
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
#!/usr/bin/env bash | |
# @name XIM Vim | |
# @description (Fcitx) XIM Frontend On The Spot workaround for GVim e.g. Browser textarea Extension | |
# @version 2017.4.14.0 | |
# @homepage https://gist.github.com/noromanba/c3a37e6908a0d71441a7f2526b643474 | |
# @author noromanba | |
# @license CC0 Univ PD https://creativecommons.org/publicdomain/zero/1.0/ | |
set -euC | |
# :help multibyte* *multi-byte* | |
# :help *xim-input-style* | |
# :help *OnTheSpot* | |
# :help *gui-fork* | |
# :help *-g* *gui* *GUI* | |
# :help *-f* *--nofork* | |
vim -gf "$@" <&0 >/dev/null 2>&1 & | |
#vim -gf "${@+"$@"}" <&0 > /dev/null 2>&1 & | |
# read from piped stdin | |
# https://stackoverflow.com/questions/2746553/bash-script-read-values-from-stdin-pipe#6779351 | |
# hints | |
# :vimgrep gf $VIMHOME/doc/* | cw | |
: <<'#DRUNK' | |
____ | |
|.+*'| | |
|....| | |
|____| | |
| | | |
| | | |
((())) | |
( ) | |
..' '.. | |
/ \ | |
|------------| | |
| XIM VIM | | |
| *(V)* | | |
| | | |
| UGANDA KCC | | |
| BOURBON | | |
| WHISKEY | | |
| | | |
|\----------/| | |
|: 40% vol. :| | |
|------------| | |
\____.--.____/ | |
#DRUNK | |
# KNOWN BUGS | |
# FIXME unworks w/ background job | |
# `vidir` of moreutils | |
# $ EDITOR=ximvim vidir # empty file; "No such file or directory" | |
# $ EDITOR="vim -gf" vidir # valid file | |
# https://github.com/madx/moreutils/blob/5ca552/vidir#L132 | |
# | |
# `edit-server` of "Edit with Emacs" Chrome Extensions | |
# $ EDIT_SERVER_EDITOR=ximvim edit-server # fill, but not apply when save | |
# $ EDIT_SERVER_EDITOR="vim -gf" edit-server # apply when save | |
# https://github.com/timbertson/edit-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment