merge conflict

This commit is contained in:
hugogogo
2022-12-20 10:47:41 +01:00
5 changed files with 156 additions and 66 deletions

View File

@@ -40,17 +40,14 @@ bind F eval "hardstatus alwayslastline"
# stuff "vim file.txt^M"
chdir $HOME/huhuhu_config
screen
chdir $HOME/huhuhu_config/tutos
screen -t tutos_shell vim -n shell.txt
screen -t tutos_git vim -n git.txt
screen -t tutos_screen vim -n screen.txt
#screen -t tutos_node vim -n node.txt
#screen -t tutos_react vim -n react.txt
#screen -t tutos_php vim -n php.txt
screen -t tutos_sites vim -n sites.txt
screen -t tutos_vim vim -n vim.txt
screen -t tutos_computer vim -n computer.txt
screen -t .vimrc vim -n ./config_files/.vimrc
screen -t .screenrc vim -n ./config_files/.screenrc
screen -t tutos_vim vim -n ./tutos/vim.txt
screen -t tutos_screen vim -n ./tutos/screen.txt
screen -t tutos_git vim -n ./tutos/git.txt
screen -t tutos_sites vim -n ./tutos/sites.txt
screen -t tutos_computer vim -n ./tutos/computer.txt
chdir $HOME
screen

View File

@@ -38,10 +38,10 @@ highlight Normal ctermbg=NONE
highlight nonText ctermbg=NONE
" show existing tab with 4 spaces width
set tabstop=4
set tabstop=2
" when indenting with '>', use 4 spaces width
set shiftwidth=4
set shiftwidth=2
" indent new line like the previous one
set autoindent
@@ -55,6 +55,12 @@ set number
" don't allow wrap
set nowrap
" in wrap mode,
" show next lines instead of '@'
" break on words
set display=lastline
set lbr
" using alternate buffer with Explore, ':b#'
" =0 ot go back to explore buffer
" =1 ot go back to last edited file
@@ -66,6 +72,7 @@ set nowrap
"let g:netrw_altfile = 0
" choose how to print list in :Explore window
" alternatively you can hit 'i' inside Explore window to switch between styles
" =0 is default
" =3 is tree style
let g:netrw_liststyle = 3
@@ -97,16 +104,28 @@ nnoremap <C-Down> :m+<CR>
nnoremap <C-Up> :m-2<CR>
nnoremap <C-Right> >><CR>k
nnoremap <C-Left> <<<CR>k
nnoremap <C-j> :m+<CR>
nnoremap <C-k> :m-2<CR>
nnoremap <C-l> >><CR>k
nnoremap <C-h> <<<CR>k
inoremap <C-Down> <Esc>:m+<CR>gi
inoremap <C-Up> <Esc>:m-2<CR>gi
inoremap <C-Right> <Esc>>><CR>gi
inoremap <C-Left> <Esc><<<CR>gi
inoremap <C-j> <Esc>:m+<CR>gi
inoremap <C-k> <Esc>:m-2<CR>gi
inoremap <C-l> <Esc>>><CR>gi
inoremap <C-h> <Esc><<<CR>gi
vnoremap <C-Down> :m'>+<CR>gv
vnoremap <C-Up> :m-2<CR>gv
vnoremap <C-Right> ><CR>gv
vnoremap <C-Left> <<CR>gv
vnoremap <C-j> :m'>+<CR>gv
vnoremap <C-k> :m-2<CR>gv
vnoremap <C-l> ><CR>gv
vnoremap <C-h> <<CR>gv
" move selection inside lines with Ctrl-Shift + left/right
vnoremap <C-S-Left> <Esc>`<<Left>i_<Esc>mz"_xgvx`zPgv<Left>o<Left>o
@@ -114,6 +133,19 @@ vnoremap <C-S-Right> <Esc>`><Right>gvxpgv<Right>o<Right>o
"---------------------------------------------------------------
" to move cursor inside wrapping
"---------------------------------------------------------------
" https://vim.fandom.com/wiki/Move_cursor_by_display_lines_when_wrapping
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
"---------------------------------------------------------------
" put swap files in a special directory
"---------------------------------------------------------------
@@ -164,7 +196,7 @@ autocmd BufNewFile *.hpp call HPPFile()
autocmd BufNewFile *.cpp if @% == 'main.cpp' | call MAINCPPFile() | else | call CPPFile()
autocmd BufNewFile Makefile call MAKEFile()
autocmd BufNewFile colors.h call COLORFile()
autocmd BufNewFile testss.hpp call TESTSFile()
autocmd BufNewFile tests.hpp call TESTSFile()

View File

@@ -1,7 +1,61 @@
**screen size** pour 2*2: 137*38 / pour 1*1: 68*19 (37 et 18 si barre des menus cachee)
**ctrl c** termine l'action en cours du terminal
**ctrl s** bloque l'affichage du terminal
**ctrl q** rétablit la communication avec le terminal
**ctrl z** stop le travail en cours et le met sur pause
**fg** relance le dernier travail mis sur pause
**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.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
* n'importe quel caractere autant de fois que possible
**ls** ** montre tous les dossiers et sous-dossiers recursivement
**chmod 755 fichier** chmod change les droits des fichiers, organisés en : rwxrwxrwx avec pour valeur r=4 w=2 x=1 donc r-w == r + w == 4 + 1 == 5
**zsh**
**sudo apt-get install zsh**
**which zsh** donne le chemin d'acces de zsh (/usr/bin/zsh)
**chsh -s /usr/bin/zsh** change shell (chsh) pour zsh
(reboot le systeme pour que les changements prennent effet)
**echo $SHELL** pour voir quel shell est utilisé
(uncomment **line --DISABLE_AUTO_TITLE="true"--** in ~/.zshrc file pour empecher screen de donner un nom automatique aux sessions)
**sass name.scss name.css** create a css file from a scss file
**sass --watch name.scss:name.css** make the transformations of scss in css file
**'tree' like :**
find | sort | grep -ve "node_modules/" -e ".git/" | sed 's#[^/]*/#|__ #g;s#__ |# |#g;s#| # #g;s#\(node_modules\|.git[ignore]*\)#\1 ...#;$a\ '
**format usb**
**sudo fdisk -l** list all disks - find yours (something like /dev/sdx)
**sudo fdisk /dev/sdx** enter in fdisk program
**p** print the partions
**o** create an empty dos table
**n** add a new partition
**p** primary
**1** partition number 1
**enter** default first selector
**+1G** for 1Gb size or *enter* for default
**a** toogle the flag *bootable*
**n** again if you want more partitions
**w** write and quit
**touchscreen :**
**sudo xinput --list** list all input
**xinput --list** list all input
**xinput disable 12** disable the input 12, touchscreen for Lenovo-FLEX-3-1120
**load to start :** add "xinput disable 12" in application autostart
ADD FORMULA TO FIND 12
**appimage :**
**chmod +x <name>.appimage** make it executable
@@ -13,6 +67,9 @@
Type=Application
**( cd /usr/share/applications && chmod 644 <name>.desktop )** maybe change permissions
**applications :**
**ln -s /path/to/executable /usr/bin**
add /usr/share/applications/<name>.desktop as explained above for appimages
**firefox extension source code :**
**right click on install** and select "copy link"
@@ -22,8 +79,34 @@
**enable accents on ubuntu :**
**compose key = right alt** change in keyboard > layout > compose key
**sudo apt install gnome-tweaks** maybe install tweak to change compose key
**r-alt ' e** é
**r-alt ` e** è
**alternatively :** https://askubuntu.com/questions/1028957/how-to-set-a-compose-key-in-ubuntu-18-04
**man xkeyboard-config** look for the compose options (shortcut: enter /compose:). You will find
compose:ralt Right Alt
compose:lwin Left Win
compose:lwin-altgr 3rd level of Left Win
compose:rwin Right Win
compose:rwin-altgr 3rd level of Right Win
compose:menu Menu
compose:menu-altgr 3rd level of Menu
compose:lctrl Left Ctrl
compose:lctrl-altgr 3rd level of Left Ctrl
compose:rctrl Right Ctrl
compose:rctrl-altgr 3rd level of Right Ctrl
compose:caps Caps Lock
compose:caps-altgr 3rd level of Caps Lock
compose:102 <Less/Greater>
compose:102-altgr 3rd level of <Less/Greater>
compose:paus Pause
compose:prsc PrtSc
compose:sclk Scroll Lock
**setxkbmap -option compose:paus** let us say you want to pick Pause as the compose key. Just issue
**XKBOPTIONS="terminate:ctrl_alt_bksp,compose:paus"** to make it reboot-persistent,
edit /etc/default/keyboard
if you had other options already,
separate them with commas
**connect to planet hoster with ssh :**
ssh hugugtzx@world-370.fr.planethoster.net -p 5022
@@ -83,7 +166,31 @@
- format partitions (re list before) :
**sudo mkfs -t vfat -n "<name>" /dev/sdb1** to format in fat32 (vfat) (MaKe FileSystem)
**list of automatic settings :**
- install screen, omyzsh, keepassxc, curl, make, firefox, signal, gnome-tweaks
- install or configure to avoid screen blue light
- install nextcloud client (apt ? or appimage ? appimage need fuse : https://github.com/AppImage/AppImageKit/wiki/FUSE), and launch at startup
- install these settings (connection with bitbucket ? ssh ? https ?)
- configure cursor speed, click with touch
- change dns
- configure firefox addons
-
- configure firefox :
- default browser
- duckduckgo default search
- addons :
- keepassxc
- i dont care about cookies
- auto tab discard
- settings > barre d'outils action click gauche > desactiver tous les autres onglets
- ublock origin
- deepl/multitranslate
- youtube speed control, by toxblh
- download file
- password settings
- setting ctrl-tab to switch to last used tabs
- configure desktop bar with infos and stats
- configure git global email and name
**todo !**
- re-add code to move cursor on wrap text in vimrc
- add vimrc, zshrc, and screenrc in default screen windows

View File

@@ -1,50 +0,0 @@
**screen size** pour 2*2: 137*38 / pour 1*1: 68*19 (37 et 18 si barre des menus cachee)
**ctrl c** termine l'action en cours du terminal
**ctrl s** bloque l'affichage du terminal
**ctrl q** rétablit la communication avec le terminal
**ctrl z** stop le travail en cours et le met sur pause
**fg** relance le dernier travail mis sur pause
**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.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
* n'importe quel caractere autant de fois que possible
**ls** ** montre tous les dossiers et sous-dossiers recursivement
**chmod 755 fichier** chmod change les droits des fichiers, organisés en : rwxrwxrwx avec pour valeur r=4 w=2 x=1 donc r-w == r + w == 4 + 1 == 5
**zsh**
**sudo apt-get install zsh**
**which zsh** donne le chemin d'acces de zsh (/usr/bin/zsh)
**chsh -s /usr/bin/zsh** change shell (chsh) pour zsh
(reboot le systeme pour que les changements prennent effet)
**echo $SHELL** pour voir quel shell est utilisé
(uncomment **line --DISABLE_AUTO_TITLE="true"--** in ~/.zshrc file pour empecher screen de donner un nom automatique aux sessions)
**sass name.scss name.css** create a css file from a scss file
**sass --watch name.scss:name.css** make the transformations of scss in css file
**'tree' like :**
find | sort | grep -ve "node_modules/" -e ".git/" | sed 's#[^/]*/#|__ #g;s#__ |# |#g;s#| # #g;s#\(node_modules\|.git[ignore]*\)#\1 ...#;$a\ '
**format usb**
**sudo fdisk -l** list all disks - find yours (something like /dev/sdx)
**sudo fdisk /dev/sdx** enter in fdisk program
**p** print the partions
**o** create an empty dos table
**n** add a new partition
**p** primary
**1** partition number 1
**enter** default first selector
**+1G** for 1Gb size or *enter* for default
**a** toogle the flag *bootable*
**n** again if you want more partitions
**w** write and quit

View File

@@ -1,3 +1,6 @@
/MODE NORMAL/
***** search the next occurence of the word under cursor
/MODE INSERTION/
**i** mode insertion avant le curseur
**I** mode insertion au debut de la ligne
@@ -10,6 +13,7 @@
/COMMANDES/
**:w** enregistrer
**:w !sudo tee %** trick to save a page with sudo
**:q** quitter
**:wq** ou **ZZ** enregister et quitter
**:q!** force a quitter