From 080109e9c3b47d664305aef0533428349eab4c88 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Fri, 3 Jun 2022 11:04:23 +0200 Subject: [PATCH] few changes, in makefile added colors --- config_files/skeleton_makefile | 26 ++++++++++++++++++++++++++ install.sh | 2 +- tutos/git.txt | 5 ++++- tutos/shell.txt | 5 ++++- tutos/vim.txt | 6 ++++++ 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/config_files/skeleton_makefile b/config_files/skeleton_makefile index d12189c..dfe2907 100644 --- a/config_files/skeleton_makefile +++ b/config_files/skeleton_makefile @@ -1,3 +1,29 @@ +# - - - - - - - # +# # +# COLORS # +# # +# - - - - - - - # + +GRAY = "\e[0;30m" +RED = "\e[0;31m" +GREEN = "\e[0;32m" +YELLOW = "\e[0;33m" +BLUE = "\e[0;34m" +PURPLE = "\e[0;35m" +CYAN = "\e[0;36m" +WHITE = "\e[0;37m" + +B_GRAY = "\e[1;30m" +B_RED = "\e[1;31m" +B_GREEN = "\e[1;32m" +B_YELLOW = "\e[1;33m" +B_BLUE = "\e[1;34m" +B_PURPLE = "\e[1;35m" +B_CYAN = "\e[1;36m" +B_WHITE = "\e[1;37m" + +RESET = "\e[0m" + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # . name = value \ . += append to a variable # # VARIABLES . value . != set result of command # diff --git a/install.sh b/install.sh index 845a1e8..9996405 100644 --- a/install.sh +++ b/install.sh @@ -74,7 +74,7 @@ function install install "$HOME/.screenrc" install "$HOME/.vimrc" install "$HOME/.zshrc" -install "$HOME/.vim/templates/skeleton_color.h" +install "$HOME/.vim/templates/skeleton_colors.h" install "$HOME/.vim/templates/skeleton.cpp" install "$HOME/.vim/templates/skeleton.hpp" install "$HOME/.vim/templates/skeleton_main.cpp" diff --git a/tutos/git.txt b/tutos/git.txt index 5ff2708..4b9af56 100644 --- a/tutos/git.txt +++ b/tutos/git.txt @@ -33,7 +33,10 @@ **git stash pop** reapply the stashed changes and removes them from the stash area **git stash apply** reaply the stashed changes and keep them in the stash area **git config --global credential.helper store** store the passwords in .git-credentials in the HOME directory (thanks to global, as opposed to the project directory) so you don't have tot type it each time -**git cherry-pick NAME_OF_BRANCH** ti merge a branch into the actual one, but only with the last commit +**git config --global core.editor "vim"** change the git editor for vim +**git cherry-pick NAME_OF_BRANCH** it merge a branch into the actual one, but only with the last commit +**git log --graph** show the graph of the commits with branchs +**git log --first-parent master** show all the commits directly on master (or other branch) **relier dossier sur serveur en local avec git** **acceder au serveur via ssh :** `ssh hugugtzx@world-370.fr.planethoster.net -p 5022` diff --git a/tutos/shell.txt b/tutos/shell.txt index ba4b723..fd7b678 100644 --- a/tutos/shell.txt +++ b/tutos/shell.txt @@ -7,9 +7,12 @@ **mkdir file{1..10}** creer 10 dossiers nommés de file1 à file10 **pwd** print working directory **xdg-open .** open working directory +**du -sh** directory sizes **ncdu** (visual version of 'du' command) quick presentation of directories size -**ssh username@ssh.server.com -p 0000** se connecter a un serveur via ssh en precisant un port +**ssh username@ssh.server.domain -p XXXX** se connecter a un serveur via ssh en precisant un port +**sftp -P XXXX username@ssh.server.domain** se connecter a un server ssh avec le protocol ftp +**vim scp://username@ssh.server.domain:XXXX//home/path/to/file** edit a remote file from local vim **pdftotext** transforme un pdf en un fichier texte **^** designe le debut d'une ligne diff --git a/tutos/vim.txt b/tutos/vim.txt index b418aa9..ea24399 100644 --- a/tutos/vim.txt +++ b/tutos/vim.txt @@ -1,3 +1,9 @@ +/SYNTAX/ +to create a new syntax file, just copy an existing one : + cp /usr/share/vim/vimXX/syntax/extension.vim ~/.vim/syntax/ +and change the name to match the extension +and change the content to whatever you want + /MODE INSERTION/ **i** mode insertion avant le curseur **I** mode insertion au debut de la ligne