changes in vim manipulation of last oppened buffer

This commit is contained in:
hugogogo
2022-10-04 16:04:01 +02:00
8 changed files with 180 additions and 15 deletions

View File

@@ -41,14 +41,17 @@ bind F eval "hardstatus alwayslastline"
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_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
chdir $HOME
screen

View File

@@ -55,9 +55,20 @@ set number
" don't allow wrap
set nowrap
" make the previous buffer be the last modified file and not the file explorer
" see `:help g:netrw_altfile`
let g:netrw_altfile = 1
" using alternate buffer with Explore, ':b#'
" =0 ot go back to explore buffer
" =1 ot go back to last edited file
" see :help g:netrw_altfile
" ! not good :
" with =1 the alternate buffer is not changed, so
" las edited file is not last file before Explore, but the previous one
" use :Lexplore instead of :Explore
"let g:netrw_altfile = 0
" choose how to print list in :Explore window
" =0 is default
" =3 is tree style
let g:netrw_liststyle = 3
"---------------------------------------------------------------

View File

@@ -5,15 +5,110 @@
# ----------------------------------------------------
# configs from old file
# i'm not sure what to do with them
# will it work on another computer ?
# default configs
# ----------------------------------------------------
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

View File

@@ -12,6 +12,21 @@ D_CONFIG_FILES="config_files"
mkdir -p ~/.vim/templates
mkdir -p ~/.vim/swapfiles
# tells git to use vim as default editor
echo -e $MAGENTA"declared vim as default editor for git"$ENDCO
git config --global core.editor "vim"
# install those package :
# vim
# wget
# vlc
# signal-desktop
# element-desktop
# nextcloud-desktop
# transmission
# htop
# build-essential (gcc g++ make etc...)
# receive 1 argument : absolute path to config file
function save_bak
{
@@ -80,3 +95,4 @@ install "$HOME/.vim/templates/skeleton.cpp"
install "$HOME/.vim/templates/skeleton.hpp"
install "$HOME/.vim/templates/skeleton_main.cpp"
install "$HOME/.vim/templates/skeleton_makefile"

30
tutos/computer.txt Normal file
View File

@@ -0,0 +1,30 @@
**touchscreen :**
**sudo 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
**appimage :**
**chmod +x <name>.appimage** make it executable
**sudo vim /usr/share/applications/<name>.desktop** create a file.desktop with content :
[Desktop Entry]
Exec=/absolute/path/to/file/<name>.AppImage
Name=<name>
Type=Application
**( cd /usr/share/applications && chmod 644 <name>.desktop )** maybe change permissions
**firefox extension source code :**
**right click on install** and select "copy link"
**curl -L <link> > /tmp/myextension.xpi** download the extension with curl inside a tmp file
**unzip /tmp/myextension.xpi -d /tmp/myextension** unzip the content
enjoy reading it ;)
**enable accents on ubuntu :**
**compose key = right alt** change in keyboard > layout > compose key
**r-alt ' e** é
**r-alt ` e** è
**connect to planet hoster with ssh :**
ssh hugugtzx@world-370.fr.planethoster.net -p 5022
**to enable vi :** `export TERM=xterm`
**locked files on nextcloud :** https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883

View File

@@ -17,6 +17,7 @@
**git branch** lists all a git project's branches
**git branch branch_name** creates a new branch
**git checkout branch_name** to switch from one branch to another
**git checkout -b branch-name** create and switch to new branch
**git log** shows a list of all previous commits
**git log --summary** show more informations
**git merge branch_name** join file changes from branch_name into current branch

View File

@@ -1,3 +1,9 @@
**axiom.ai :** create bots to automat tasks on internet
**wolframalpha.com :** answer complex questions in math, science, and life
**tinywow.com :** free tools for tasks online
**opensourcealternative.to :** open source alternatives
**jotform.com :** 10 000 forms templates for your website
**create a live usb with partition** https://theartofmachinery.com/2016/04/21/partitioned_live_usb.html
**tools** www.preparetocode.io
**design** http://www.dailyui.co/

View File

@@ -26,7 +26,9 @@
**:bp** go to previous buffer
**:bn** go to next buffer
**:b#** switch to last edited buffer
**:explore / :ex<tab>** navigate through directory, rename, and plus
**:Explore / :ex<tab>** navigate through directory, rename, and plus
**:Lexplore / :Lex<tab>** buffer directory open in left split window
**:Lexplore 30** Explore window is of size 30
**search through files :**
**:vim** the one function that gets to be name as the software ;)
performes a kind of grep search on a list of files
@@ -124,11 +126,12 @@
**guu** passe la ligne en lowercase
**bgUw** change le mot en uppercase
**~** change casse du caractere sous le cursor
* va a la prochaine occurence du mot sous le curseur
***** va a la prochaine occurence du mot sous le curseur
**q:** affiche les dernieres commandes
**==** rétablit la bonne indentation pour la ligne
**=G** rétablit la bonne indentation pour toute la page
**''** go to last cursor position
**gx** open the file under cursor, or url
/REMPLACER/
**:s/old/new** remplace la 1ere occurence de ancien par nouveau