Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
here saw is hash, array is input array in which we have to find unique
[g - indicates global
34 To replace all strings "abc" in the file with "xyz" c - conditional replacement (asks for replacement)]
1. place the cursor on the number to be incremented
35 To increment a number 2. press ctrl+a
1. place the cursor on the number to be decremented
36 To decrement a number 2. press ctrl+x
1. esc
37 to insert a word in next line 2. press "o"
1. esc
38 to insert a word in previous line 2. press "O"
39 to delete lines without counting :<starting line no>,<last line no>d
1. esc
40 to compare the files in splitted mode 2. :windo diffthis
1. esc
41 to open a file 2. :E
1. esc
42 to repeat the previous command 2. . note: .(dot)
43 to disable file difference mode diffoff
1. esc
2. place cursor on the starting line of block
3.press "mm"
4. place cursor on last line of block
5. press "d ' m" (here, press "d" key then " ' "key then "m" key)
in command line it shows no of lines yanked.
44 to delete block of lines
1. esc
:g//d
45 To delete the selected lines with selected pattern 2. if any line is having that string the entire line will be deleted
1.esc
%s///gn
46 To find how many patterns are existed in opened vim 2. The number of strings will be displayed
47 To delete entire lines except matched pattern :v//d