DEV Community

mahir dasare
mahir dasare

Posted on

Text Editor

Text Editor: vi editor, nano, gedit
Commands to read file: more, less
Filters
Horizontal Filters : head,tail,greap
Verticle Filters: cut
Tools for string manipulation :wc , sort,awk, sed,

Text Editor : vi/vim Editor
:w = write changes / save
:q = quite
:wq! = write/save and quite without save(forcefully)
:q! = quite without save(forcefully)

Text Editor : vi/vim Editor
Copy in vi (in command mode)
y! = copy letter
yw = copy a word
yy = copy a line
2yy = copy 2 lines
Y{ = copy paragraphs above the cursor
Y} = copy paragraph below the cursor

Text Editor : vi/vim Editor
Cut in vim ( in command mode)
cl = cut a letter
cw = cut a word
cc = cut a line
2cc = cut 2 line
c{ = cut paragraph above the cursor
c} = cut paragraphbelow the cursor

Text Editor : vi/vim Editor
Delete in vim (in command mode)
d! = delete a letter
dw = delete a word
dd = delete a line
2dd = delete 2 lines
d{ = delete paragraphs above the cursor
d} = delete paragraph below thee cursor

more:
more is a filter for paging through text one screenful at a time.
Ex: more [file_name]

Less:
Less is similar to more except it allows backward movement in the file as well as forward movement.
Ex: less[filter_name]

Top comments (0)