summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bash.html.markdown9
-rw-r--r--csharp.html.markdown6
-rw-r--r--de-de/haskell-de.html.markdown2
-rw-r--r--es-es/julia-es.html.markdown5
-rw-r--r--fr-fr/haskell.html.markdown2
-rw-r--r--fr-fr/lua-fr.html.markdown2
-rw-r--r--fr-fr/scala.html.markdown5
-rw-r--r--fr-fr/xml-fr.html.markdown127
-rw-r--r--haskell.html.markdown2
-rw-r--r--julia.html.markdown2
-rw-r--r--ko-kr/lua-kr.html.markdown2
-rw-r--r--ko-kr/php-kr.html.markdown2
-rw-r--r--lua.html.markdown2
-rw-r--r--perl6.html.markdown2
-rw-r--r--php.html.markdown2
-rw-r--r--pt-br/haskell-pt.html.markdown2
-rw-r--r--pt-br/php-pt.html.markdown2
-rw-r--r--python.html.markdown22
-rw-r--r--python3.html.markdown4
-rw-r--r--ru-ru/coffeescript-ru.html.markdown104
-rw-r--r--ru-ru/haskell-ru.html.markdown2
-rw-r--r--ru-ru/julia-ru.html.markdown2
-rw-r--r--ru-ru/php-ru.html.markdown2
-rw-r--r--rust.html.markdown4
-rw-r--r--tmux.html.markdown180
-rw-r--r--tr-tr/php-tr.html.markdown2
-rw-r--r--zh-cn/c-cn.html.markdown4
-rw-r--r--zh-cn/haskell-cn.html.markdown2
-rw-r--r--zh-cn/julia-cn.html.markdown2
-rw-r--r--zh-cn/lua-cn.html.markdown2
-rw-r--r--zh-cn/php-cn.html.markdown2
31 files changed, 379 insertions, 131 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index dc7d32b6..9b199b8c 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -9,6 +9,7 @@ contributors:
- ["akirahirose", "https://twitter.com/akirahirose"]
- ["Anton Strömkvist", "http://lutic.org/"]
- ["Rahil Momin", "https://github.com/iamrahil"]
+ - ["Gregrory Kielian", "https://github.com/gskielian"]
filename: LearnBash.sh
---
@@ -199,4 +200,12 @@ sort file.txt
uniq -d file.txt
# prints only the first column before the ',' character
cut -d ',' -f 1 file.txt
+# replaces every occurrence of 'okay' with 'great' in file.txt, (regex compatible)
+sed -i 's/okay/great/g' file.txt
+# print to stdout all lines of file.txt which match some regex, the example prints lines which beginning with "foo" and end in "bar"
+grep "^foo.*bar$" file.txt
+# pass the option "-c" to instead print the number of lines matching the regex
+grep -c "^foo.*bar$" file.txt
+# if you literally want to search for the string, and not the regex, use fgrep (or grep -F)
+fgrep "^foo.*bar$" file.txt
```
diff --git a/csharp.html.markdown b/csharp.html.markdown
index 136f6c50..f6708590 100644
--- a/csharp.html.markdown
+++ b/csharp.html.markdown
@@ -508,7 +508,7 @@ on a new line! ""Wow!"", the masses cried";
// LINQ - maps a store to IQueryable<T> objects, with delayed execution
// e.g. LinqToSql - maps to a database, LinqToXml maps to an xml document
- var db = new BikeRespository();
+ var db = new BikeRepository();
// execution is delayed, which is great when querying a database
var filter = db.Bikes.Where(b => b.HasTassles); // no query run
@@ -767,9 +767,9 @@ on a new line! ""Wow!"", the masses cried";
/// EntityFramework Code First is awesome (similar to Ruby's ActiveRecord, but bidirectional)
/// http://msdn.microsoft.com/en-us/data/jj193542.aspx
/// </summary>
- public class BikeRespository : DbSet
+ public class BikeRepository : DbSet
{
- public BikeRespository()
+ public BikeRepository()
: base()
{
}
diff --git a/de-de/haskell-de.html.markdown b/de-de/haskell-de.html.markdown
index df6267f9..2c548961 100644
--- a/de-de/haskell-de.html.markdown
+++ b/de-de/haskell-de.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
lang: de-de
contributors:
- ["Adit Bhargava", "http://adit.io"]
diff --git a/es-es/julia-es.html.markdown b/es-es/julia-es.html.markdown
index 41a7c68b..203ee3bb 100644
--- a/es-es/julia-es.html.markdown
+++ b/es-es/julia-es.html.markdown
@@ -1,8 +1,9 @@
---
-language: julia
+language: Julia
contributors:
- ["Leah Hanson", "http://leahhanson.us"]
- - ["Guillermo Garza" ]
+translators:
+ - ["Guillermo Garza", "http://github.com/ggarza"]
filename: learnjulia-es.jl
lang: es-es
---
diff --git a/fr-fr/haskell.html.markdown b/fr-fr/haskell.html.markdown
index 989db1d5..d9d3151f 100644
--- a/fr-fr/haskell.html.markdown
+++ b/fr-fr/haskell.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
contributors:
- ["Adit Bhargava", "http://adit.io"]
translators:
diff --git a/fr-fr/lua-fr.html.markdown b/fr-fr/lua-fr.html.markdown
index 922d6ebc..b4e2a161 100644
--- a/fr-fr/lua-fr.html.markdown
+++ b/fr-fr/lua-fr.html.markdown
@@ -1,5 +1,5 @@
---
-language: lua
+language: Lua
filename: learnlua-fr.lua
contributors:
- ["Tyler Neylon", "http://tylerneylon.com/"]
diff --git a/fr-fr/scala.html.markdown b/fr-fr/scala.html.markdown
index da562138..a43edf16 100644
--- a/fr-fr/scala.html.markdown
+++ b/fr-fr/scala.html.markdown
@@ -1,12 +1,11 @@
---
language: Scala
-filename: learnscala.scala
contributors:
- ["George Petrov", "http://github.com/petrovg"]
- ["Dominic Bou-Samra", "http://dbousamra.github.com"]
translators:
- - ["Anne-Catherine Dehier", "https://github.com/spellart"]
-filename: learn.scala
+ - ["Anne-Catherine Dehier", "https://github.com/spellart"]
+filename: learnscala-fr.scala
lang: fr-fr
---
diff --git a/fr-fr/xml-fr.html.markdown b/fr-fr/xml-fr.html.markdown
new file mode 100644
index 00000000..d7e76892
--- /dev/null
+++ b/fr-fr/xml-fr.html.markdown
@@ -0,0 +1,127 @@
+---
+language: xml
+contributors:
+ - ["João Farias", "https://github.com/JoaoGFarias"]
+translators:
+ - ["Geoffrey Liu", "https://github.com/g-liu"]
+filename: learnxml.xml
+---
+
+XML est un langage de balisage conçu pour stocker et transporter les informations.
+
+Contrairement à HTML, XML ne spécifie pas comment afficher ou formater les informations, juste comment les porter.
+
+* La syntaxe XML
+
+```xml
+<!-- Les commentaires en XML ressemblent ceci -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<librairie>
+ <livre categorie="CUISINE">
+ <titre lang="en">Everyday Italian</titre>
+ <auteur>Giada De Laurentiis</auteur>
+ <an>2005</an>
+ <prix>30.00</prix>
+ </livre>
+ <livre categorie="ENFANTS">
+ <titre lang="en">Harry Potter</titre>
+ <auteur>J. K. Rowling</auteur>
+ <an>2005</an>
+ <prix>29.99</prix>
+ </livre>
+ <livre categorie="WEB">
+ <titre lang="en">Learning XML</titre>
+ <auteur>Erik T. Ray</auteur>
+ <an>2003</an>
+ <prix>39.95</prix>
+ </livre>
+</librairie>
+
+<!-- Ce qui suit est un fichier XML typique.
+ Il commence par une déclaration, qui informe certaines métadonnées (en option).
+
+XML utilise une structure arborescente. Ci-dessus, le nœud racine est «librairie», qui a
+   trois nœuds enfants, qui sont appelés «livres». Ces nœuds ont plus de nœuds enfants, et ainsi de suite ...
+
+On crée les nœuds avec des balises d'ouverture / fermeture, et les enfants sont les nœuds juste entre
+   les balises d'ouverture et de fermeture. -->
+
+
+<!-- XML porte deux types d'informations:
+ 1 - Les attributs -> les métadonnées sur un nœud.
+ Habituellement, l'analyseur XML utilise cette information pour bien stocker les données.
+ 2 - Les éléments -> les informations pures.
+ C'est ce que l'analyseur retrouvera du fichier XML.
+ Les éléments apparaissent entre les balises d'ouverture et de fermeture, sans parenthèses. -->
+
+
+<!-- Ci-dessous, un élément avec deux attributs -->
+<fichier type="gif" id="4293">ordinateur.gif</fichier>
+
+
+```
+
+* Un document bien formaté & le validation
+
+Un document XML est bien formaté s'il est syntaxiquement correct.
+Cependant, il est possible d'injecter plus de contraintes dans le document,
+en utilisant les définitions de documents, tels que les schémas DTD et XML.
+
+Un document XML qui suit une définition de document est dit valide,
+en ce qui concerne ce document.
+
+Avec cet outil, vous pouvez vérifier les données XML en dehors de la logique de l'application.
+
+```xml
+
+<!-- Ci-dessous, vous pouvez voir une version simplifiée du document de librairie,
+   avec l'addition de définition DTD. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE note SYSTEM "Librairie.dtd">
+<librairie>
+ <livre categorie="CUISINE">
+ <titre>Everyday Italian</titre>
+ <prix>30.00</prix>
+ </livre>
+</librairie>
+
+<!-- Cette DTD pourrait être quelque chose comme: -->
+
+<!DOCTYPE note
+[
+<!ELEMENT librairie (livre+)>
+<!ELEMENT livre (titre,prix)>
+<!ATTLIST livre categorie CDATA "Littérature">
+<!ELEMENT titre (#PCDATA)>
+<!ELEMENT prix (#PCDATA)>
+]>
+
+<!-- La DTD commence par une déclaration.
+   Après, le nœud racine est déclaré, qui exige un ou plusieurs nœuds enfants.
+   Chaque «livre» doit contenir exactement un «titre» et «prix» et un attribut
+   appelé «catégorie», avec «littérature» comme valeur par défaut.
+   Les nœuds de «titre» et «prix» contiennent des informations de caractère analysés
+ (Anglais: «parsed character data») -->
+
+<!-- La DTD pourrait être déclarée dans le fichier XML lui-même -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE note
+[
+<!ELEMENT librairie (livre+)>
+<!ELEMENT livre (titre,prix)>
+<!ATTLIST livre categorie CDATA "Littérature">
+<!ELEMENT titre (#PCDATA)>
+<!ELEMENT prix (#PCDATA)>
+]>
+
+<librairie>
+ <livre categorie="CUISINE">
+ <titre>Everyday Italian</titre>
+ <prix>30.00</prix>
+ </livre>
+</librairie>
+```
diff --git a/haskell.html.markdown b/haskell.html.markdown
index e0489710..ad12de2a 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
contributors:
- ["Adit Bhargava", "http://adit.io"]
---
diff --git a/julia.html.markdown b/julia.html.markdown
index feb38463..3a52018c 100644
--- a/julia.html.markdown
+++ b/julia.html.markdown
@@ -1,5 +1,5 @@
---
-language: julia
+language: Julia
contributors:
- ["Leah Hanson", "http://leahhanson.us"]
filename: learnjulia.jl
diff --git a/ko-kr/lua-kr.html.markdown b/ko-kr/lua-kr.html.markdown
index 850587a0..b4a018ef 100644
--- a/ko-kr/lua-kr.html.markdown
+++ b/ko-kr/lua-kr.html.markdown
@@ -1,5 +1,5 @@
---
-language: lua
+language: Lua
category: language
contributors:
- ["Tyler Neylon", "http://tylerneylon.com/"]
diff --git a/ko-kr/php-kr.html.markdown b/ko-kr/php-kr.html.markdown
index 80f324f3..1f53221f 100644
--- a/ko-kr/php-kr.html.markdown
+++ b/ko-kr/php-kr.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
category: language
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
diff --git a/lua.html.markdown b/lua.html.markdown
index be9f3141..0809215f 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -1,5 +1,5 @@
---
-language: lua
+language: Lua
contributors:
- ["Tyler Neylon", "http://tylerneylon.com/"]
filename: learnlua.lua
diff --git a/perl6.html.markdown b/perl6.html.markdown
index ee27ff42..52625bc2 100644
--- a/perl6.html.markdown
+++ b/perl6.html.markdown
@@ -64,7 +64,7 @@ say "Interpolate an array using [] : @array[]";
my @keys = 0, 2;
@array[@keys] = @letters; # Assign using an array
-say @array; #=> a 2 b
+say @array; #=> a 6 b
# There are two more kinds of lists: Parcel and Arrays.
# Parcels are immutable lists (you can't modify a list that's not assigned).
diff --git a/php.html.markdown b/php.html.markdown
index e1bb86a0..039288a0 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
- ["Trismegiste", "https://github.com/Trismegiste"]
diff --git a/pt-br/haskell-pt.html.markdown b/pt-br/haskell-pt.html.markdown
index 55f90bd6..788dc1d2 100644
--- a/pt-br/haskell-pt.html.markdown
+++ b/pt-br/haskell-pt.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
contributors:
- ["Adit Bhargava", "http://adit.io"]
translators:
diff --git a/pt-br/php-pt.html.markdown b/pt-br/php-pt.html.markdown
index 344df43a..0e710742 100644
--- a/pt-br/php-pt.html.markdown
+++ b/pt-br/php-pt.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
- ["Trismegiste", "https://github.com/Trismegiste"]
diff --git a/python.html.markdown b/python.html.markdown
index 390c7b76..ba236fb3 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -3,6 +3,7 @@ language: python
contributors:
- ["Louie Dinh", "http://ldinh.ca"]
- ["Amin Bandali", "http://aminbandali.com"]
+ - ["Andre Polykanine", "https://github.com/Oire"]
filename: learnpython.py
---
@@ -54,19 +55,22 @@ to Python 2.x. Look for another tour of Python 3 soon!
# Modulo operation
7 % 3 # => 1
+# Exponentiation (x to the y'th power)
+2**4 # => 16
+
# Enforce precedence with parentheses
(1 + 3) * 2 # => 8
# Boolean Operators
-+# Note "and" and "or" are case-sensitive
-+True and False #=> False
-+False or True #=> True
-+
-+# Note using Bool operators with ints
-+0 and 2 #=> 0
-+-5 or 0 #=> -5
-+0 == False #=> True
-+2 == True #=> False
+# Note "and" and "or" are case-sensitive
+True and False #=> False
+False or True #=> True
+
+# Note using Bool operators with ints
+0 and 2 #=> 0
+-5 or 0 #=> -5
+0 == False #=> True
+2 == True #=> False
1 == True #=> True
# negate with not
diff --git a/python3.html.markdown b/python3.html.markdown
index a94f4eae..e478e57f 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -3,6 +3,7 @@ language: python3
contributors:
- ["Louie Dinh", "http://pythonpracticeprojects.com"]
- ["Steven Basart", "http://github.com/xksteven"]
+ - ["Andre Polykanine", "https://github.com/Oire"]
filename: learnpython3.py
---
@@ -50,6 +51,9 @@ Note: This article applies to Python 3 specifically. Check out the other tutoria
# Modulo operation
7 % 3 # => 1
+# Exponentiation (x to the y'th power)
+2**4 # => 16
+
# Enforce precedence with parentheses
(1 + 3) * 2 # => 8
diff --git a/ru-ru/coffeescript-ru.html.markdown b/ru-ru/coffeescript-ru.html.markdown
new file mode 100644
index 00000000..f8416f38
--- /dev/null
+++ b/ru-ru/coffeescript-ru.html.markdown
@@ -0,0 +1,104 @@
+---
+language: coffeescript
+contributors:
+ - ["Tenor Biel", "http://github.com/L8D"]
+ - ["Xavier Yao", "http://github.com/xavieryao"]
+translators:
+ - ["asaskevich", "http://github.com/asaskevich"]
+filename: learncoffee-ru.coffee
+lang: ru-ru
+---
+
+CoffeeScript - это небольшой язык, который компилируется один-в-один в эквивалентный код на языке JavaScript, а потому он не интерпретируется во время исполнения JavaScript кода.
+Ключевой особенностью CoffeeScript является то, что он пытается создать читабельный, качественно оформленный и плавный JavaScript код, прекрасно работающий в любой среде JavaScript.
+
+Также загляните на официальный сайт [языка](http://coffeescript.org/), где можно найти весьма полное учебное пособие по CoffeeScript.
+
+```coffeescript
+# CoffeeScript - язык хипстеров.
+# Язык использует самое модное из множества современных языков.
+# Эти комментарии по стилю похожи на комментарии Ruby или Python, они используют "решетку" в качестве знака комментария.
+
+###
+Блоки комментариев выделяются тремя символами "решетки", в результирующем JavaScript коде они будут преобразованы в '/ * и '* /'.
+
+Перед тем, как идти далее, Вам нужно понимать семантику JavaScript.
+###
+
+# Присвоение:
+number = 42 #=> var number = 42;
+opposite = true #=> var opposite = true;
+
+# Условия:
+number = -42 if opposite #=> if(opposite) { number = -42; }
+
+# Функции:
+square = (x) -> x * x #=> var square = function(x) { return x * x; }
+
+fill = (container, liquid = "coffee") ->
+ "Заполняем #{container} жидкостью #{liquid}..."
+#=>var fill;
+#
+#fill = function(container, liquid) {
+# if (liquid == null) {
+# liquid = "coffee";
+# }
+# return "Заполняем " + container + " жидкостью " + liquid + "...";
+#};
+
+# Списки и диапазоны:
+list = [1..5] #=> var list = [1, 2, 3, 4, 5];
+
+# Объекты:
+math =
+ root: Math.sqrt
+ square: square
+ cube: (x) -> x * square x
+#=> var math = {
+# "root": Math.sqrt,
+# "square": square,
+# "cube": function(x) { return x * square(x); }
+#}
+
+# Многоточия:
+race = (winner, runners...) ->
+ print winner, runners
+#=>race = function() {
+# var runners, winner;
+# winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+# return print(winner, runners);
+#};
+
+# Проверка на существование объекта:
+alert "Так и знал!" if elvis?
+#=> if(typeof elvis !== "undefined" && elvis !== null) { alert("Так и знал!"); }
+
+# Итерации по массивам:
+cubes = (math.cube num for num in list)
+#=>cubes = (function() {
+# var _i, _len, _results;
+# _results = [];
+# for (_i = 0, _len = list.length; _i < _len; _i++) {
+# num = list[_i];
+# _results.push(math.cube(num));
+# }
+# return _results;
+# })();
+
+foods = ['broccoli', 'spinach', 'chocolate']
+eat food for food in foods when food isnt 'chocolate'
+#=>foods = ['broccoli', 'spinach', 'chocolate'];
+#
+#for (_k = 0, _len2 = foods.length; _k < _len2; _k++) {
+# food = foods[_k];
+# if (food !== 'chocolate') {
+# eat(food);
+# }
+#}
+```
+
+## На почитать
+
+- [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/)
+- [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read)
+- [CoffeeScript на русском](http://cidocs.ru/coffeescript/)
diff --git a/ru-ru/haskell-ru.html.markdown b/ru-ru/haskell-ru.html.markdown
index 03e66d05..e15fe6b7 100644
--- a/ru-ru/haskell-ru.html.markdown
+++ b/ru-ru/haskell-ru.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
contributors:
- ["Adit Bhargava", "http://adit.io"]
translators:
diff --git a/ru-ru/julia-ru.html.markdown b/ru-ru/julia-ru.html.markdown
index cd55e116..29392604 100644
--- a/ru-ru/julia-ru.html.markdown
+++ b/ru-ru/julia-ru.html.markdown
@@ -1,5 +1,5 @@
---
-language: julia
+language: Julia
contributors:
- ["Leah Hanson", "http://leahhanson.us"]
translators:
diff --git a/ru-ru/php-ru.html.markdown b/ru-ru/php-ru.html.markdown
index edcac4dd..53b2f916 100644
--- a/ru-ru/php-ru.html.markdown
+++ b/ru-ru/php-ru.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
- ["Trismegiste", "https://github.com/Trismegiste"]
diff --git a/rust.html.markdown b/rust.html.markdown
index 0b9a5e58..3717a7d9 100644
--- a/rust.html.markdown
+++ b/rust.html.markdown
@@ -255,8 +255,8 @@ fn main() {
## Further reading
There’s a lot more to Rust—this is just the basics of Rust so you can
-understand the most important things. To learn more about Rust, read the
-[Rust tutorial](http://doc.rust-lang.org/tutorial.html) and check out the
+understand the most important things. To learn more about Rust, read [The Rust
+Guide](http://doc.rust-lang.org/guide.html) and check out the
[/r/rust](http://reddit.com/r/rust) subreddit. The folks on the #rust channel
on irc.mozilla.org are also always keen to help newcomers.
diff --git a/tmux.html.markdown b/tmux.html.markdown
index 8d7aa752..ebc312ed 100644
--- a/tmux.html.markdown
+++ b/tmux.html.markdown
@@ -2,22 +2,23 @@
category: tool
tool: tmux
contributors:
- - ["kaernyk", "http://github.com/kaernyk"]
+ - ["kaernyk", "https://github.com/kaernyk"]
+ - ["jmaud", "https://github.com/jmaud"]
filename: LearnTmux.txt
---
<a href="http://tmux.sourceforge.net/">
-tmux</a> is a terminal multiplexer: it enables a number of terminals
-to be created, accessed, and controlled from a single screen. tmux
+tmux</a> is a terminal multiplexer: it enables a number of terminals
+to be created, accessed, and controlled from a single screen. tmux
may be detached from a screen and continue running in the background
then later reattached.
```
+
tmux [command] # Run a command
- # 'tmux' with no commands will create a new
- session
+ # 'tmux' with no commands will create a new session
new # Create a new session
-s "Session" # Create named session
@@ -54,7 +55,7 @@ then later reattached.
## Key Bindings
-# The method of controlling an attached tmux session is via key
+# The method of controlling an attached tmux session is via key
# combinations called 'Prefix' keys.
----------------------------------------------------------------------
@@ -63,47 +64,48 @@ then later reattached.
(M-1) = Meta + 1 -or- Alt + 1
----------------------------------------------------------------------
- ? # List all key bindings
- : # Enter the tmux command prompt
- r # Force redraw of the attached client
- c # Create a new window
+ ? # List all key bindings
+ : # Enter the tmux command prompt
+ r # Force redraw of the attached client
+ c # Create a new window
- ! # Break the current pane out of the window.
- % # Split the current pane into two, left and right
- " # Split the current pane into two, top and bottom
+ ! # Break the current pane out of the window.
+ % # Split the current pane into two, left and right
+ " # Split the current pane into two, top and bottom
- n # Change to the next window
- p # Change to the previous window
- { # Swap the current pane with the previous pane
- } # Swap the current pane with the next pane
+ n # Change to the next window
+ p # Change to the previous window
+ { # Swap the current pane with the previous pane
+ } # Swap the current pane with the next pane
- s # Select a new session for the attached client
+ s # Select a new session for the attached client
interactively
- w # Choose the current window interactively
- 0 to 9 # Select windows 0 to 9
+ w # Choose the current window interactively
+ 0 to 9 # Select windows 0 to 9
- d # Detach the current client
- D # Choose a client to detach
+ d # Detach the current client
+ D # Choose a client to detach
- & # Kill the current window
- x # Kill the current pane
+ & # Kill the current window
+ x # Kill the current pane
- Up, Down # Change to the pane above, below, left, or right
- Left, Right
+ Up, Down # Change to the pane above, below, left, or right
+ Left, Right
- M-1 to M-5 # Arrange panes:
- # 1) even-horizontal
- # 2) even-vertical
- # 3) main-horizontal
- # 4) main-vertical
- # 5) tiled
+ M-1 to M-5 # Arrange panes:
+ # 1) even-horizontal
+ # 2) even-vertical
+ # 3) main-horizontal
+ # 4) main-vertical
+ # 5) tiled
- C-Up, C-Down # Resize the current pane in steps of one cell
- C-Left, C-Right
+ C-Up, C-Down # Resize the current pane in steps of one cell
+ C-Left, C-Right
- M-Up, M-Down # Resize the current pane in steps of five cells
- M-Left, M-Right
+ M-Up, M-Down # Resize the current pane in steps of five cells
+ M-Left, M-Right
+```
### Configuring ~/.tmux.conf
@@ -111,30 +113,59 @@ then later reattached.
tmux.conf can be used to set options automatically on start up, much
like how .vimrc or init.el are used.
+
+```
# Example tmux.conf
-# 2014.9
+# 2014.10
+
+
+### General
+###########################################################################
+
+# Enable UTF-8
+setw -g utf8 on
+set-option -g status-utf8 on
+
+# Scrollback/History limit
+set -g history-limit 2048
+
+# Index Start
+set -g base-index 1
+
+# Mouse
+set-option -g mouse-select-pane on
+
+# Force reload of config file
+unbind r
+bind r source-file ~/.tmux.conf
### Keybinds
-######################################################################
+###########################################################################
# Unbind C-b as the default prefix
-unbind-key C-befix C-a
+unbind C-b
+
+# Set new default prefix
+set-option -g prefix `
# Return to previous window when prefix is pressed twice
-bind-key C-a last-window
-bind-key ` last-window
+bind C-a last-window
+bind ` last-window
# Allow swapping C-a and ` using F11/F12
-bind-key F11 set-option -g prefix C-a
-bind-key F12 set-option -g prefix `
+bind F11 set-option -g prefix C-a
+bind F12 set-option -g prefix `
-# Activate inner-most session (when nesting tmux)
-# to send commands
-bind-key a send-prefix
+# Keybind preference
+setw -g mode-keys vi
+set-option -g status-keys vi
-# Index Start
-set -g base-index 1
+# Moving between panes with vim movement keys
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
# Window Cycle/Swap
bind e previous-window
@@ -142,23 +173,20 @@ bind f next-window
bind E swap-window -t -1
bind F swap-window -t +1
-# easy-to-remember split pane commands
-bind | split-window -h
+# Easy split pane commands
+bind = split-window -h
bind - split-window -v
unbind '"'
unbind %
-# moving between panes with vim movement keys
-bind h select-pane -L
-bind j select-pane -D
-bind k select-pane -U
-bind l select-pane -R
+# Activate inner-most session (when nesting tmux) to send commands
+bind a send-prefix
### Theme
-#####################################################################
+###########################################################################
-# Statusbar Color Palette
+# Statusbar Color Palatte
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
@@ -187,14 +215,7 @@ setw -g window-status-activity-fg yellow
### UI
-######################################################################
-
-# Statusbar
-set-option -g status-utf8 on
-
-# Keybind preference
-setw -g mode-keys vi
-set-option -g status-keys vi
+###########################################################################
# Notification
setw -g monitor-activity on
@@ -202,41 +223,20 @@ set -g visual-activity on
set-option -g bell-action any
set-option -g visual-bell off
-# Mouse
-setw -g mode-mouse on
-set-option -g mouse-select-pane on
-set -g mouse-resize-pane on
-set -g mouse-select-window on
-
# Automatically set window titles
set-option -g set-titles on
-
-# window number,program name,active (or not)
-set-option -g set-titles-string '#H:#S.#I.#P #W #T'
+set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# Statusbar Adjustments
-set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
-set -g status-interval 3
-
-# Statusbar with right-aligned Date / Time
-#set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
+set -g status-left "#[fg=red] #H#[fg=green]:#[fg=white]#S#[fg=green] |#[default]"
# Show performance counters in statusbar
# Requires https://github.com/thewtex/tmux-mem-cpu-load/
-#set -g status-right '#[fg=green]][#[fg=white] #(tmux-mem-cpu-load 5 4) #[fg=green]][ #[fg=yellow]%H:%M#[default]'
+set -g status-interval 4
+set -g status-right "#[fg=green] | #[fg=white]#(tmux-mem-cpu-load)#[fg=green] | #[fg=cyan]%H:%M #[default]"
-
-### Misc
-######################################################################
-
-# Scrollback/History limit
-set -g history-limit 4096
-
-bind r source-file ~/.tmux.conf
```
-### External Resources
-
<a href="http://tmux.sourceforge.net/">Tmux | Home</a><br>
<a href="http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux">Tmux Manual page</a><br>
<a href="http://wiki.gentoo.org/wiki/Tmux">Archlinux Wiki</a><br>
diff --git a/tr-tr/php-tr.html.markdown b/tr-tr/php-tr.html.markdown
index 3db437cf..5258d785 100644
--- a/tr-tr/php-tr.html.markdown
+++ b/tr-tr/php-tr.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
filename: learnphp-tr.php
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
diff --git a/zh-cn/c-cn.html.markdown b/zh-cn/c-cn.html.markdown
index 223f6e35..1e10416e 100644
--- a/zh-cn/c-cn.html.markdown
+++ b/zh-cn/c-cn.html.markdown
@@ -566,7 +566,7 @@ typedef void (*my_fnp_type)(char *);
'\'' // 单引号
'\"' // 双引号
'\xhh' // 十六进制数字. 例子: '\xb' = vertical tab
-'\ooo' // 十进制数字. 例子: '\013' = vertical tab
+'\ooo' // 八进制数字. 例子: '\013' = vertical tab
// 打印格式:
"%d" // 整数
@@ -579,7 +579,7 @@ typedef void (*my_fnp_type)(char *);
"%c" // 字母
"%p" // 指针
"%x" // 十六进制
-"%o" // 十进制
+"%o" // 八进制
"%%" // 打印 %
///////////////////////////////////////
diff --git a/zh-cn/haskell-cn.html.markdown b/zh-cn/haskell-cn.html.markdown
index 8d51f144..cb7ccdee 100644
--- a/zh-cn/haskell-cn.html.markdown
+++ b/zh-cn/haskell-cn.html.markdown
@@ -1,5 +1,5 @@
---
-language: haskell
+language: Haskell
filename: learn-haskell-zh.hs
contributors:
- ["Adit Bhargava", "http://adit.io"]
diff --git a/zh-cn/julia-cn.html.markdown b/zh-cn/julia-cn.html.markdown
index 7afc9043..1f91d52c 100644
--- a/zh-cn/julia-cn.html.markdown
+++ b/zh-cn/julia-cn.html.markdown
@@ -1,5 +1,5 @@
---
-language: julia
+language: Julia
filename: learn-julia-zh.jl
contributors:
- ["Jichao Ouyang", "http://oyanglul.us"]
diff --git a/zh-cn/lua-cn.html.markdown b/zh-cn/lua-cn.html.markdown
index 3ba098ec..53a603a2 100644
--- a/zh-cn/lua-cn.html.markdown
+++ b/zh-cn/lua-cn.html.markdown
@@ -1,5 +1,5 @@
---
-language: lua
+language: Lua
lang: zh-cn
contributors:
- ["Tyler Neylon", "http://tylerneylon.com/"]
diff --git a/zh-cn/php-cn.html.markdown b/zh-cn/php-cn.html.markdown
index 24939681..2def7f1c 100644
--- a/zh-cn/php-cn.html.markdown
+++ b/zh-cn/php-cn.html.markdown
@@ -1,5 +1,5 @@
---
-language: php
+language: PHP
contributors:
- ["Malcolm Fell", "http://emarref.net/"]
- ["Trismegiste", "https://github.com/Trismegiste"]