-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvim.txt
135 lines (71 loc) · 5.53 KB
/
vim.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
============================================================================================================================
*Marks WORD means any kind word: hello, bye adios any strings.
mostly used firs letters and there meaning
c -- stands for chang and put in to insert mode
d -- stands delete
v -- stands fot visual selecting
w -- word
i -- inter
a -- when selecting including spaces (around)
============================================================================================================================
============================================================================================================================
-------------------------------------------------->Daily Usage<-------------------------------------------------------------
============================================================================================================================
-- vat or vit, it selects everything + tags and vit selects only characters inside the tag
-- vip selects whole paragrafs, vap selects whole paragrafs + space.
-- B and W whole sentance w and b jumps one word (wW next word and bB previous)
-- daw this deleta whole line with space or whole line e.g. ("hello ") or (console.log"hello" pk.js) delate till pk.js
-- . repeating last command
-- dG delete whole page below cursor
-- di" delete everything(WORD) in "WORD" cursor should be pointed
-- ci" deletes and put in insert mode
-- ^ start of the line
-- $ end the line
-- >j move current line and line below (like Tabbing)
-- > move current line to the right (like Tabbing)
-- gg goes to first line and first word
-- G goes to Last line and first word
-- Ctrl+p is word auto-completion (changinc inside up and down works Ctrl+p and Ctrl+n or just using arrow)
-- F2 is key shortcut for on/off paste mode when we are in insert mode. set pastetoggle=<F2> " Turn on/off the set paste (this make copping from outside normally)
============================================================================================================================
----------------------------------------> Advance copping or manipulationg copyed stuff <-----------------------------------
============================================================================================================================
-- reg is for register and it remembers all ragister that we may need or we inputed
-- "WORD and any command e.g. "WORDdd it will register what we want and delete. using advance coping and
============================================================================================================================
-------------------------------------------------> VIM Mabs Manipulation <--------------------------------------------------
============================================================================================================================
-- :tabe open another tab in vim
-- :tabn changes to next tab
-- :tabp changes to previous tab
-- :tabfind {file} open a new tab with filename given, searching the 'path' to find it
-- :tabclose close current tab
-- :%s/WORD/WORD/g replace all old with new throughout file
--
============================================================================================================================
--------------------------------------------> Tips And Usefull Stuff <-----------------------------------------------------
============================================================================================================================
-- reg is register and it remmembers all copp
-- set cursorline this gievs line to cursor position to be more appearance
============================================================================================================================
-----------------------------------> This needs Plugin surrounding.vim to execute <-----------------------------------------
============================================================================================================================
-- csw" this let to surrond word it anything we want e.g. hello (csw") "hello"
-- ds" this deletes surrounding " " e.g. "Hello World!" after that command it will be Hello World!
-- cs"( this changes surrounding " " with ( ) e.g. "Hello World!" after that command it will be (Hello World!)
-- dst this deletes surrounding tags e.g. <p> Hello world </p> after execution it will be Hello world
-- cst this changes surrounding tags e.g. </p> Hello </p> and we write tag which we want to be placed <strong>. after execution it will be <strong> Hello </strong>
--------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------
How to comment #
#CTRL+v
#Select Text
#CTRL+i
#Type what kind of comment I want e.g. " # "
#And it appears like this
--------------------------------------------------------------------------------------------------------------------------------------
How to uncomment #
CTRL+v
Select used comment symbol e.g. " # "
Press d and it deletes it's self
--------------------------------------------------------------------------------------------------------------------------------------