TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

using vi with tmux and tt++

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts
View previous topic :: View next topic  
Author Message
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Thu Mar 27, 2014 3:11 pm    Post subject: using vi with tmux and tt++ Reply with quote

this should be useful if you use tmux & enjoy editing with vi or vim

the script uses the command 'vi <file name>' under tmux/tt++ to

close open tmux pane, edit <file name> with vi, when vi closes re-open tmux pane and continue process which vi so rudely interrupted!

Code:

#nop for editing with vi/vim
#nop see the line 'tmux split -h 'vi ~/ARTT/%1;'?
#nop change '~/ARTT/' to desired directory
#nop and change 'all_but_roomname.log' to file you want to tail
#nop or whatever command you were running in that pane before
#nop you begin editing a file with vi

#alias  {ls} {#sys ls *.tt}
#alias  {vi %1}{
    #var screen_1 shut;
    #script {path} {tmux list-panes};
    #showme {listing current tmux panes...};
    #showme {$path[2]};
    #if { "$screen_1" == "open" } {#sys tmux kill-pane -t 1};
    #run {vi} {
        tmux split -h 'vi ~/ARTT/%1;
        tmux split-window -h -p 100 "tail -f all_but_roomname.log";
        tmux select-pane -t 0;'
        };
    }

    #nop the system command 'tmux list-panes' above may return:
    #act {1: [%1x%2] [history %3/%4, %5 bytes] %%%6} {
        #var screen_1 open;
        }

_________________
www.abandonedrealms.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group