Update english documentation :
- Add info about vi (ESC-v). - Add tr. - Add vimdiff.pull/253/head
parent
f1f70242ac
commit
081f826508
|
@ -76,7 +76,7 @@ Notes:
|
|||
|
||||
- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob.
|
||||
|
||||
- Alternatively, if you love vi-style key-bindings, use `set -o vi`.
|
||||
- Alternatively, if you love vi-style key-bindings, use `set -o vi`. In order to write long commands you can use the famous `ESC-v` that will allow to edit your command inside vi. Note : EDITOR=vim environment variable must be set as well.
|
||||
|
||||
- To see recent commands, `history`. There are also many abbreviations such as `!$` (last argument) and `!!` last command, though these are often easily replaced with **ctrl-r** and **alt-.**.
|
||||
|
||||
|
@ -188,6 +188,8 @@ Notes:
|
|||
|
||||
- Know about `tee` to copy from stdin to a file and also to stdout, as in `ls -al | tee file.txt`.
|
||||
|
||||
- Know about `tr` to transpose characters. Very efficient to remove carriage return ('\n').
|
||||
|
||||
- Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set `LANG` or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run *many times* slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using `export LC_ALL=C`.
|
||||
|
||||
- Know basic `awk` and `sed` for simple data munging. For example, summing all numbers in the third column of a text file: `awk '{ x += $3 } END { print x }'`. This is probably 3X faster and 3X shorter than equivalent Python.
|
||||
|
@ -211,7 +213,9 @@ Notes:
|
|||
|
||||
- If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it).
|
||||
|
||||
- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes.
|
||||
- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` easier to read diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes.
|
||||
|
||||
- Use `vimdiff` to compare and edit files. Really efficient !
|
||||
|
||||
- For binary files, use `hd` for simple hex dumps and `bvi` for binary editing.
|
||||
|
||||
|
|
Loading…
Reference in New Issue