Professional Documents
Culture Documents
Gvimfundamentals
Gvimfundamentals
---------------------------------------------------------------------------
what is gvim
graphical Visually improved text editor
it has lot shortcut command to make our day today activity easy
Mode of operation
Two Modes of operation
escape( command mode) (indication: thick rect box)
(by pressing esc key we can go for escape mode)
commands
1. setting numbers
a set number/se nu
b deleting numbers
set nonumber/se nonu
2. open/create file
vertical split
vspl filename.ext
horizontal split
spl filename.ext
ex vspl halfadder.v
3. Activate Syntax for file file type
syntax on
syntax off
-----------------------------------------------------------------------------------
----------
30-03-2022
Q what is main intention gvim
A use 80% of keyboard and use 10% mouse
Commands
4. save/write file
:w--- save single file
save/write all file
:wa
5. .quit/exit file
:q-- quit single file
:qa -- quit all file
b save and quit
:wq
7. save and quit all file
:wqa
8. quitting without save
q!
9. Navigation
a gg ( no colon) go to the top of file
b G (no colon) go to the bottom of file
c moving between lines
h--> left
j--> down
k--> up
l--> right
d Moving multiple lines up and down
10k/10up_arrow key
10j---moving 10 lines down
e moving to specific line
:linenumber and press enter key
:55
f moving between files
ctrlw( use arrow key betweeen files )
(in this case mouse is better)
g maximize horizontal window
ctrlw_
h equall sze
ctrlw=
k word movement
w --> to move one word forward
nw ---> n is no of words
ex 5w
b--> back ward
10. copy, paste cut/delete
a. lines
copy lines
yy--- copy one line
nyy---- copy multiple line
paste line
p ----paste one line
np ---- paste multiple line
b. cut/delete line
dd -- single line
ndd --- multiple line
to remove highlights
:noh
b. search and substitute
:%s/pattern to search/patern to replace/g
----------------------------------------------------------------------------
01/04/2022
usr/bin/gvim --- equivalent to c-drive-program file in linux it is called
usr/bin(binary files)
cd--- change directory
cywin is linux interface for window os ( its not linux os) using cywin to excute
linux command to interact window os ---windows interact with our hardware memory
write
only 90% of command works here
we donot have acces direct to linux server because some changes to file get
serrver effected
10% of command can be done only in linux os
pwd ---> present working directory