Commits

Alfredo Di Napoli committed 9c27526

Updated README; added the possibility to change default terminal

  • Participants
  • Parent commits 1570ed8

Comments (0)

Files changed (2)

    :align: center
 
 Beduino (i.e, a Bedouin) is an effort to create THE Ocaml bundle for Vim. It
-includes all the handy features of `vim-ocaml <https://github.com/jrk/vim-ocaml>`_,
+includes all the handy features of `vim-ocaml <https://github.com/jrk/vim-ocaml>`,
 plus a lightweight interactive development cycle through tmux.
 
 .. image:: http://pancake.io/89929b/img/simple_session.png
 =============
 
 * Vim >= 7.3 with Python support
-* xterm (will be removed in future releases)
 * `rlwrap <http://utopia.knoware.nl/~hlub/rlwrap/rlwrap.html>`_
 * `tmux <http://tmux.sourceforge.net/>`_ >= 1.6 (although 1.5 should work too)
 
 Key bindings
 ============
 
-Beduino tries to your existing binding alone, using the concept of
-**local map leader** to allows more flexibility. Therefore, you are strongly
+Beduino tries to leave your existing binding alone, using the concept of
+**local map leader** to allow more flexibility. Therefore, you are strongly
 encouraged to set a local leader, including this line in your .vimrc::
 
     let maplocalleader = <your-favourite>
     <localleader>bb "Eval the whole buffer (i.e., #use "file.ml")
     (after a visual selection) :call BeduinoEvalVisual() "Eval visual selection
 
+Flags and Variables
+===================
+
+This is a selection of variable to put inside your .vimrc to customize
+Beduino's behaviour:
+
+* **g:beduino_default_terminal = <default:xterm>**
+
 Future directions
 =================
 
 beginner, so I don't expect the code to be polished at all. Bear in mind that
 at the current status a lot of thing are hardcoded:
 
-* You need xterm in order to create the Beduino server
 * Tmux buffers are written in a file called beduino.buff. In future releases
   I'll work to a way to make this process less invasive as possible.

File ftplugin/ocaml.vim

 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
+" Default variables
+if !exists("g:beduino_default_terminal")
+  let g:beduino_default_terminal = "xterm"
+endif
+
 python << EOF
 import vim
 import os
   if (w:sessions != "")
     "Attach to an already running session
     echo "Connecting to an already running Beduino session..."
-    call system("xterm -e tmux attach-session -t beduino &")
+    call system(g:beduino_default_terminal ." -e tmux attach-session -t beduino &")
     echo "Connected."
   else
     echo "Starting a new Beduino session..."
-    call system("xterm -e tmux new-session -s beduino -n toplevel 'rlwrap ocaml' &")
+    call system(g:beduino_default_terminal ." -e tmux new-session -s beduino -n toplevel 'rlwrap ocaml' &")
     echo "Connected."
   endif
 endfun