From d9acba7f14d8caebcfd8250a16d0f395e860bac3 Mon Sep 17 00:00:00 2001 From: Matthieu Keller Date: Mon, 2 Sep 2013 16:04:10 +0200 Subject: [PATCH 1/8] correct and add vim shortcuts --- cheatsheets/vim | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cheatsheets/vim b/cheatsheets/vim index 3b79d77..22b8bf5 100644 --- a/cheatsheets/vim +++ b/cheatsheets/vim @@ -1,8 +1,14 @@ -# Appending -a - drops vim into append mode -i - enters append mode without character skip +# Insertion +a - enters insertion mode, append after the cursor. +A - enters insertion mode, at the end of the line. +i - enters insertion mode, insert before the cursor. +I - enters insertion mode, at the beginning of the line. +o - enters insertion mode, creating a new line under the cursor. +O - enters insertion mode, creating a mew line above the cursor. +C - enters insertion mode, cut the end of the line. # File management :w - writes (saves) file +:x - writes (saves) file ans exit :q - quits -;q! - quits without saving changes +:q! - quits without saving changes From ec5123d21edaf1e9c9e5e9d312a5cdeacebbcafc Mon Sep 17 00:00:00 2001 From: Matthieu Keller Date: Mon, 2 Sep 2013 16:05:43 +0200 Subject: [PATCH 2/8] Create aptitude --- cheatsheets/aptitude | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cheatsheets/aptitude diff --git a/cheatsheets/aptitude b/cheatsheets/aptitude new file mode 100644 index 0000000..26d0af7 --- /dev/null +++ b/cheatsheets/aptitude @@ -0,0 +1,5 @@ +# To search for packages: +aptitude search "whatever" + +# To display package records for the named package(s): +aptitude show pkg(s) From 221c1ce1909daf63fd4583d5a0d050ca371690ba Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 3 Sep 2013 04:09:36 +0200 Subject: [PATCH 3/8] Added pacman (archlinux PACkage MANager) cheatsheet --- cheatsheets/pacman | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cheatsheets/pacman diff --git a/cheatsheets/pacman b/cheatsheets/pacman new file mode 100644 index 0000000..bffe1f5 --- /dev/null +++ b/cheatsheets/pacman @@ -0,0 +1,32 @@ +# All the following command work as well with multiple package names + +# To search for a package +pacman -Ss + +# To update the local package base and upgrade all out of date packages +pacman -Suy + +# To install a package +pacman -S + +# To uninstall a package +pacman -R + +# To uninstall a package and his depedencies, removing all new orphans +pacman -Rcs + +# To get informations about a package +pacman -Si + +# To install a package from builded package file (.tar.xz) +pacman -U + +# To list the commands provided by an installed package +pacman -Ql nvidia-utils | sed -n -e 's/.*\/bin\///p' | tail -n +2 + +# To list explicitly installed packages +pacman -Qe + +# To list orphan packages (installed as dependencies and not required anymore) +pacman -Qdt + From 837042f71802e8df97dba8115eafca1d9c5d2b38 Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 3 Sep 2013 05:39:24 +0200 Subject: [PATCH 4/8] Added yaourt (Yet AnOther User Repository Tool) cheatsheet --- cheatsheets/pacman | 11 +++++++++++ cheatsheets/yaourt | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 cheatsheets/yaourt diff --git a/cheatsheets/pacman b/cheatsheets/pacman index bffe1f5..e348ea2 100644 --- a/cheatsheets/pacman +++ b/cheatsheets/pacman @@ -30,3 +30,14 @@ pacman -Qe # To list orphan packages (installed as dependencies and not required anymore) pacman -Qdt + +# You can't directly install packages from the Arch User Database (AUR) with pacman. +# You need yaourt to perform that. But considering yaourt itself is in the AUR, here is how to +build a package from its tarball. +# First, get the .tar.gz archive and unpack it +wget +tar -xzf +cd +# Then build the package and install it +makepkg -s +pacman -U diff --git a/cheatsheets/yaourt b/cheatsheets/yaourt new file mode 100644 index 0000000..f3a6ec1 --- /dev/null +++ b/cheatsheets/yaourt @@ -0,0 +1,23 @@ +# All pacman commands are working the same way with yaourt. +# Just check the pacman cheatsheet. +# For instance, to install a package : +pacman -S +yaourt -S +# The difference is that yaourt will also query the Arch User Repository, +# and if appropriate, donwload the source and build the package requested. + +# Here are the commands yaourt provides while pacman doesn't : + +# To search for a package and install it +yaourt + +# To update the local package base and upgrade all out of date package, including the ones from +AUR and the packages based on development repos (git, svn, hg...) +yaourt -Suya --devel + +# For all of the above commands, if you want yaourt to stop asking constantly for confirmations, +use the option --noconfirm + +# To build a package from source +yaourt -Sb + From 1599c81e8f9f80a5dde4d494a505f0a455774d75 Mon Sep 17 00:00:00 2001 From: Benny Date: Tue, 3 Sep 2013 11:08:25 +0200 Subject: [PATCH 5/8] Create tmux cheatfile --- cheatsheets/tmux | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 cheatsheets/tmux diff --git a/cheatsheets/tmux b/cheatsheets/tmux new file mode 100644 index 0000000..fe369c2 --- /dev/null +++ b/cheatsheets/tmux @@ -0,0 +1,41 @@ +# Start tmux +tmux + +# Detach from tmux +Ctrl-B D + +# Restore tmux session +tmux attach + +# Display session +tmux ls + +# Start a shared session +tmux -S /tmp/your_shared_session +chmod 777 /tmp/your_shared_session + +# Help screen (Q to quit) +Ctrl-B ? + +# Scroll in window +Ctrl-B PageUp/Down + +# Window management +# ================= + +# Create window +Ctrl-B C + +# Destroy window +Ctrl-B X + +# Switch between windows +Ctrl-B [0-9] +or +Ctrl-B Arrows + +# Split windows horizontally +Ctrl-B % + +# Split windows vertically +Ctrl-B " From 00549c1d8e06962962d4ef47a8d2474f69600ad4 Mon Sep 17 00:00:00 2001 From: Benny Date: Tue, 3 Sep 2013 11:10:20 +0200 Subject: [PATCH 6/8] Use lowercase letters --- cheatsheets/tmux | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cheatsheets/tmux b/cheatsheets/tmux index fe369c2..e9b76ce 100644 --- a/cheatsheets/tmux +++ b/cheatsheets/tmux @@ -1,41 +1,41 @@ -# Start tmux +# Start tmux: tmux -# Detach from tmux -Ctrl-B D +# Detach from tmux: +Ctrl-b d -# Restore tmux session +# Restore tmux session: tmux attach -# Display session +# Display session: tmux ls -# Start a shared session +# Start a shared session: tmux -S /tmp/your_shared_session chmod 777 /tmp/your_shared_session -# Help screen (Q to quit) -Ctrl-B ? +# Help screen (Q to quit): +Ctrl-b ? -# Scroll in window -Ctrl-B PageUp/Down +# Scroll in window: +Ctrl-b PageUp/PageDown # Window management # ================= -# Create window -Ctrl-B C +# Create window: +Ctrl-b c -# Destroy window -Ctrl-B X +# Destroy window: +Ctrl-b x -# Switch between windows -Ctrl-B [0-9] +# Switch between windows: +Ctrl-b [0-9] or -Ctrl-B Arrows +Ctrl-b Arrows -# Split windows horizontally -Ctrl-B % +# Split windows horizontally: +Ctrl-b % -# Split windows vertically -Ctrl-B " +# Split windows vertically: +Ctrl-b " From a45568ec5f3b079613e9656f4a70e915b1c92c65 Mon Sep 17 00:00:00 2001 From: LIETART Frederic Date: Tue, 3 Sep 2013 13:25:16 +0200 Subject: [PATCH 7/8] Add set editor to git Add set editor to git --- cheatsheets/git | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cheatsheets/git b/cheatsheets/git index d0e7c80..fb5a1c7 100644 --- a/cheatsheets/git +++ b/cheatsheets/git @@ -2,6 +2,9 @@ git config --global user.name "John Doe" git config --global user.email johndoe@example.com +# To set your editor: +git config --global core.editor emacs + # To enable color: git config --global color.ui true From 253eae29354bc094802766d72f8b04bdaf3ca5f9 Mon Sep 17 00:00:00 2001 From: Chimyx Date: Tue, 3 Sep 2013 16:01:09 +0200 Subject: [PATCH 8/8] Correction in pacman file --- cheatsheets/pacman | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets/pacman b/cheatsheets/pacman index e348ea2..353f6c5 100644 --- a/cheatsheets/pacman +++ b/cheatsheets/pacman @@ -22,7 +22,7 @@ pacman -Si pacman -U # To list the commands provided by an installed package -pacman -Ql nvidia-utils | sed -n -e 's/.*\/bin\///p' | tail -n +2 +pacman -Ql | sed -n -e 's/.*\/bin\///p' | tail -n +2 # To list explicitly installed packages pacman -Qe