summary refs log tree commit diff stats
path: root/examples
Commit message (Expand)AuthorAgeFilesLines
* Fix the urxvt preview documentationWojciech Siewierski2016-10-081-1/+1
* Implement the urxvt-based image previewsWojciech Siewierski2016-10-051-0/+8
* Fix misspellingsstepshal2016-06-261-1/+1
* Merge branch 'E301' of https://github.com/stepshal/rangerhut2016-06-182-0/+2
|\
| * Add one blank line where is expectedstepshal2016-06-162-0/+2
* | Add two blank lines where is expectedstepshal2016-06-167-0/+12
|/
* doc/tools/print_colors.py: remove trailing newlinestepshal2016-06-071-1/+0
* examples/plugin_new_macro.py: fix spaceshut2016-06-021-3/+3
* fixed key binding for new tabs in rc_emacs.conf, its now <C-x><C-f>hut2016-04-011-1/+1
* Merge branch 'vifon/pmount' of https://github.com/Vifon/rangerhut2015-11-141-0/+30
|\
| * Add plugin_pmount.pyWojciech Siewierski2015-10-091-0/+30
* | examples/rc_emacs.conf: re-enable numeric modifier keyshut2015-10-201-1/+0
|/
* Add ability to use ranger as file-chooser in gvimNg Oon-Ee2015-08-041-1/+5
* added examples/plugin_ipc.pyWojciech Siewierski2015-06-211-0/+45
* Fix mktemp invocation to work on Mac OS X and LinuxJesse Byler2015-06-101-1/+1
* Replaced file.basename with file.relative_path where appropriate.Wojciech Siewierski2015-05-082-3/+3
* added examples/rc_emacs.confhut2015-05-041-0/+533
* added example plugin that adds a linemodehut2015-04-191-0/+16
* Should I dual ranger/cleric or wait for the THAC0 bonus? v1.7.0hut2015-04-1410-10/+10
* moved "doc/examples" to "examples" for more visibilityhut2015-04-1311-0/+221
* move examples to doc/exampleshut2013-03-0911-200/+0
* examples/rifle_sxiv: fix rifle_sxiv with chars like []hut2013-03-091-1/+1
* Fixed the sxiv workaround to handle spaces and be more POSIX compliant.Pierre Neidhardt2013-03-051-7/+21
* Added version info to exampleshut2013-03-0111-0/+22
* use 4-space-indents in files that had 2-space-indentshut2013-02-221-5/+5
* core.main: added RANGER_LOAD_DEFAULT_RC environment variablehut2013-02-221-9/+0
* examples/plugin_chmod_keybindings.py: fixed crashhut2013-02-221-1/+1
* examples/rifle_sxiv.sh: removed realpath dependencyhut2013-02-181-1/+8
* examples/rifle_sxiv.sh: remove bash dependencyhut2013-02-181-1/+1
* fsobject.directory.accept_file: pass directory, not dirnamehut2013-02-151-3/+3
* examples/README: add instructions on how to install pluginshut2013-02-131-0/+3
* removed all trailing whitespaceshut2013-02-101-1/+1
* replaced tabs with 4 spaces in all python fileshut2013-02-101-7/+7
* added examples/rifle_different_file_opener.confhut2012-12-041-0/+7
* added examples/plugin_hello_world.pyhut2012-12-041-0/+21
* updated man page, improved hookshut2012-12-041-5/+5
* removed options.py, improved plugins. *UPDATE YOUR COMMANDS.PY*hut2012-12-046-1/+69
* examples/rifle_sxiv.sh: fix symlink handlinghut2012-08-071-1/+1
* added the examples from the man page to the examples directoryhut2012-08-065-0/+67
#n72'>72 73 74
75
76
77
78



                                                                                          
                                 
                                         

                                                
                                                                                                               
                                                 

                       

                                                                                                 
                    
                                     
                             



                             





                               






















                                                                                 


         
                             
                                                                                                                               
                         




                                                                                                                                             
                                                                                                                   







                                                                                                                                                       
                                                                                                                                                                                     


                                                                                            



                                     
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - real-files.mu</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim7.4_v2">
<meta name="syntax" content="none">
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="minimal-light">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #c6c6c6; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.muRecipe { color: #ff8700; }
.LineNr { }
.Constant { color: #008787; }
.Special { color: #ff6060; }
.Comment { color: #005faf; }
-->
</style>

<script type='text/javascript'>
<!--

/* function to open any folds containing a jumped-to line before jumping to it */
function JumpToLine()
{
  var lineNum;
  lineNum = window.location.hash;
  lineNum = lineNum.substr(1); /* strip off '#' */

  if (lineNum.indexOf('L') == -1) {
    lineNum = 'L'+lineNum;
  }
  lineElem = document.getElementById(lineNum);
  /* Always jump to new location even if the line was hidden inside a fold, or
   * we corrected the raw number to a line ID.
   */
  if (lineElem) {
    lineElem.scrollIntoView(true);
  }
  return true;
}
if ('onhashchange' in window) {
  window.onhashchange = JumpToLine;
}

-->
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/master/real-files.mu'>https://github.com/akkartik/mu/blob/master/real-files.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="Comment"># example program: read a character from one file and write it to another</span>
<span id="L2" class="LineNr"> 2 </span><span class="Comment"># BEWARE: this will modify your file system</span>
<span id="L3" class="LineNr"> 3 </span><span class="Comment"># before running it, put a character into /tmp/mu-x</span>
<span id="L4" class="LineNr"> 4 </span><span class="Comment"># after running it, check /tmp/mu-y</span>
<span id="L5" class="LineNr"> 5 </span>
<span id="L6" class="LineNr"> 6 </span><span class="muRecipe">def</span> <a href='real-files.mu.html#L6'>main</a> [
<span id="L7" class="LineNr"> 7 </span>  <span class="Constant">local-scope</span>
<span id="L8" class="LineNr"> 8 </span>  f:num/file <span class="Special">&lt;-</span> $open-file-for-reading <span class="Constant">[/tmp/mu-x]</span>
<span id="L9" class="LineNr"> 9 </span>  $print <span class="Constant">[file to read from: ]</span>, f, <span class="Constant">10/newline</span>
<span id="L10" class="LineNr">10 </span>  c:char, eof?:bool <span class="Special">&lt;-</span> $read-from-file f
<span id="L11" class="LineNr">11 </span>  $print <span class="Constant">[copying ]</span>, c, <span class="Constant">10/newline</span>
<span id="L12" class="LineNr">12 </span>  f <span class="Special">&lt;-</span> $close-file f
<span id="L13" class="LineNr">13 </span>  $print <span class="Constant">[file after closing: ]</span>, f, <span class="Constant">10/newline</span>
<span id="L14" class="LineNr">14 </span>  f <span class="Special">&lt;-</span> $open-file-for-writing <span class="Constant">[/tmp/mu-y]</span>
<span id="L15" class="LineNr">15 </span>  $print <span class="Constant">[file to <a href='075channel.mu.html#L60'>write</a> to: ]</span>, f, <span class="Constant">10/newline</span>
<span id="L16" class="LineNr">16 </span>  $write-to-file f, c
<span id="L17" class="LineNr">17 </span>  f <span class="Special">&lt;-</span> $close-file f
<span id="L18" class="LineNr">18 </span>]
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->