From 1be97f416aa72229b955a4cd47d8f671bb865e94 Mon Sep 17 00:00:00 2001 From: Hizenberg469 Date: Sun, 24 Aug 2025 19:39:12 +0300 Subject: [PATCH] Vim setting, vimrc and vim buffer is done --- .visual.txt.swp => .buf-dad.txt.swp | Bin 12288 -> 12288 bytes buffer-tut.txt | 133 ++++++++++++++++++++++++++++ vim-commands => vim-commands.txt | 1 + vimrc-tut.txt | 95 ++++++++++++++++++++ 4 files changed, 229 insertions(+) rename .visual.txt.swp => .buf-dad.txt.swp (75%) create mode 100644 buffer-tut.txt rename vim-commands => vim-commands.txt (96%) create mode 100644 vimrc-tut.txt diff --git a/.visual.txt.swp b/.buf-dad.txt.swp similarity index 75% rename from .visual.txt.swp rename to .buf-dad.txt.swp index 580df13a6ac2f7746fe1e5f2c551fc9b355037d0..fa9e63581ac1d00b7d33aaf2a2bcb7ed02530231 100644 GIT binary patch delta 304 zcmZojXh@hK!jmK~#1Lf5z)+N*Uovr_%0w4e_N3A@-ITw5PY}7%Q6vwAXeD(t%^@JCwic$61`MNNL-3Iq6!I>iVGLGaN+>>N+8Z0DF^=R-MFo52aqZu&{+D#Z{B+| zZ|CpXSx27wWOZSQ9!pOWyq+QC>b@)P<=6I-=Tn6EO6kb`SFc&#oJ@OZEn0l0(+<+M zr$T2)rwLcJ_{55@&T(4@6IIbl=};?QFfW+sh#+JbWb<#895T9b83l|2+bgh}9Gaf$ z-Rk?tUZ>CPUE4n0M2!MQ0i%FXz$jo8FbWt2i~>f1|CIu|y@R}q89kEB>TL49W8gh$ znm40>QNSo*6fg=H1&jhl0i%FXz$jo8FbWt2{(}lI{7`@8Q9|}Sj*G|d|6Bk6|M)Z^ zH^3$E9;kv>!7JeQ9zuQq-+`~e7vMASG58Q%0vEwK@Fq9~j)EhAf<55(-GuxCz6UqK zC*T91!P}q)${+_)U@!P>7a>1^Z@>-kDYy=u*>)_ zvSu1JRfA?*+!r>BJv7JKLNgCq1e%P>wX)h{QZwrmSN^(SqZ2F4^O(zmfOBi!!%0AA zo8-LeaNo*vk8LoYj~?_i^L0b{j+IkV;-sOl!)>lL&t)`hPN6(=)aYT$%=TG}ORcON z^8_l$?WR@~T6^5e`b{PS7K|Qu#Z_F2O=ODmN^Ud%#ZYnUud^1jmXy@% zIB@BANx70;t^A{pmRuy34UaI9v%azqqu~^7wq#C0qPSEjkZGNFxNK)3yh1Fc8 zI6PP`W~+rvmj^>SE@jJ=!fIyx!pYKdzLvi@B&D=`vQ(;!=pThvR!fxhO-RxpiNQ zHUvI)T36CZ;%U+dC6=L*w8fgd*6Uk~`_`gtdf*_vfUnESl{iF;RYNm$EYCaKQ*G{# zB?0d7wu^a2!2`3ivj^$nsp-`8~Xb#MH5)Gf7MeyIGT1zESKn zYqz^&_>L+aLTUV$(q83E?=QS)Zxzh+t)9PMCeyci{(gx}--6%a4d^8_&iIP+{6Ieh zg|;r&x?2inH2;Id#v%{s3iksg3GoD`eQb_m_OX4mXIpwh#qA^gwxwO4Cs~IFyjDYn ze%xVpSjcLKPSSN|SUm1}Xdo1Or~BTxJ=JRy5(eyn?J)8U+xa5@z$O>DhVEy*+<~nt z@(tgmqR8Ne6!`}Cp2&CqHWPV<>?q_oP0_L|8k%~%p~;DU(--S5wp+B9u-IwX#uBz! zz)85}^3+D+T7+v+2}!arvdF}OT!6VC1MX|G2@~5r*PQq;S9#lGHYZ)!XP9gf=Wg7F znRA(3=j0ujhR1b_NhhFP6(THY81U$Rj!&P{R`hHY()L1! z&k=GaNy7Pb)yvd;Q&Uy%onNO~QNG#6XjJ2Aos57d6HE6yMx(b>bnD}5#prahhP<5i sy;LVk3pAc!w2u9#xgij_=i<`6)au===++pXbk9(>%Y0^Q?mw9MC%@1yxc~qF diff --git a/buffer-tut.txt b/buffer-tut.txt new file mode 100644 index 0000000..d059057 --- /dev/null +++ b/buffer-tut.txt @@ -0,0 +1,133 @@ +Buffer +---------- + +Defination: It is the in-memory defination of a file. + It represent the content of the file by + storing it inside memory. + +Opening multipe files in Vim. + +* From terminal + vim .... + + +* Shell expansion shortcuts: + vim file* + + This will open all the file which follow pattern + in their file name that is mentioned as an argument + here. + +* To see all the open buffers: + + Use commands: :buffers + +* To know more on buffers: + + Use commands: :h :buffers + +* To change the buffer to another opened file + + :buffer + :buffer + + Note : Instead of :buffer, we can use :b. + +* To open to the next buffer of the current opened buffer. + + We can use: :bnext or :bn + + To do this in opposite direction we can use: + + :bprevious or :bp + +* To go to the first buffer. + + :bfirst or :bf + +* To go the last buffer. + + :blast or :bl + +* Shortcut key-binding to move to the previously editing buffer. + + CTRL + ^ + +* The %a and # symbol meaning. + + %a : Represent the active buffer and currently loaded. + # : Represent the previously editing buffer. + +* Another way to move back to the alternate buffer. + + :b# + +%% TIPS %% + +When we try to do the editing on the current buffer and check the +buffer list. +It will present a '+' indicating that the editing done is not saved. +And when we try to change the buffer, it wil throw error. + +We can still force to change the buffer by using '!'. + +------------------------------ + +There are three states of buffer. + +-> Active state and showing the buffer. + +-> Inactive state and not shown in the buffer. + +-> Inactive state but in the memory. (#h +) + + +* To allow the buffer to be hidden without writing it into the file. + We can use option: + :set hidden + + This allow to edit multiple buffer without necessarily writing it. + +* To abandone all the changes of all the buffer. + + :qall! + +* To save all the changes of all the buffer. + + :wall + +* To open another file without switching to that new window of the same file. + + :badd + +* To unload a currently active buffer. + + :bdelete or :bd -> This is optional if the buffer is not the current active file. + +* To delete range of buffer. + + :,bd + + and + To delete all the buffer. + :%bd + +* To execute a line command on each and every buffer. + + :bufdo set