merci à Roman pour cette contribution — Fred Radeff 2008/04/14 14:07

j'utilise stata-se en mode console (pas xstata-se) et je me suis crée un
script ( ev. à améliorer) qui me permet d'utiliser vim au lieu de l'éditeur 
standard de xstata (pas de highlight syntax) pour
envoyer des lignes de commandes directement à stata-se. Finalement,
c'est rien d'autre que d'envoyer des commandes d'une console à autre.

vous remarques sont bienvenues: ouetech[at]lohnstudie[dot]ch
Put in your .vimrc:

" your MAP list
map <F8> : w! $HOME/<CR>:!$HOME/bin/<CR>:<CR>
" this key-map will write stata-syntax or a part of it if selected in
visual mode from the active buffer to the file named and execute
it through in the stata-konsole launched before with shell-script below launches stata-se and writes its konsole identifiers to the
file which will be executed by the vim key-map F8 above:


# see this tutorial to understand dcop
# When there is more than one application/object, which one should you
use? Got a reference?

# open new konsole and get konsole identifier
konsole=$(dcopstart konsole-script)

# get session identifier
session=`dcop $konsole konsole currentSession`
# rename session to STATA
dcop $konsole $session renameSession STATA10

# define color shema (save your own or look for in list : konsole --schemas)
dcop $konsole $session setSchema WhiteOnBlack.schema

# write down shell script which afterwards will be executed by Vim
in order to send selected syntax via to stata-konsole (see below)
echo "dcop $konsole $session sendSession 'do ~/'">$HOME/bin/
# allow execution
chmod u+x $HOME/bin/

# finally start stata in the identified terminal
dcop $konsole $session sendSession 'stata-se -q'

# for other editors or OS see:

  • info/vim_avec_stata_en_mode_konsole.txt
  • Dernière modification : 2018/07/18 09:46
  • de radeff