fix vimwiki command order; fix window class for tvim
This commit is contained in:
parent
3e89680a0b
commit
7c21d2da5c
2 changed files with 5 additions and 4 deletions
5
tvim
5
tvim
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
typeset -a vimopt=(
|
typeset -a vimopt=(
|
||||||
'--cmd' 'let g:tvim = 1'
|
'--cmd' 'let g:tvim = 1'
|
||||||
'--cmd' "set tgc mouse=a title titlestring=[%F]%m\\ -\\ TVIM"
|
'--cmd' "set tgc title titlestring=[%F]%m\\ -\\ TVIM"
|
||||||
|
'-c' 'set mouse=a'
|
||||||
)
|
)
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
|
@ -12,4 +13,4 @@ error() {
|
||||||
termbin=$(command -v st) || termbin=$(command -v xterm) || error "No terminal found!"
|
termbin=$(command -v st) || termbin=$(command -v xterm) || error "No terminal found!"
|
||||||
vimbin=$(command -v nvim) || vimbin=$(command -v vim) || error "No vim binary found!"
|
vimbin=$(command -v nvim) || vimbin=$(command -v vim) || error "No vim binary found!"
|
||||||
|
|
||||||
exec "$termbin" -e "$vimbin" "${vimopt[@]}" "$@" &>/dev/null & disown
|
exec "$termbin" -c tvim -e "$vimbin" "${vimopt[@]}" "$@" &>/dev/null & disown
|
||||||
|
|
4
vimwiki
4
vimwiki
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
index="$HOME/vimwiki/index.wiki"
|
index="$HOME/vimwiki/index.wiki"
|
||||||
typeset -a vimopts=(
|
typeset -a vimopts=(
|
||||||
'--cmd' 'packadd vimwiki'
|
|
||||||
'-c' 'set titlestring=vimwiki'
|
'-c' 'set titlestring=vimwiki'
|
||||||
"$index"
|
'-c' 'packadd vimwiki'
|
||||||
|
'-c' "e $index"
|
||||||
)
|
)
|
||||||
case $1 in
|
case $1 in
|
||||||
-g) vimbin=$(command -v gvim);;
|
-g) vimbin=$(command -v gvim);;
|
||||||
|
|
Loading…
Reference in a new issue