I want to know how to do some operations on highlighted lines (with v operator) like providing tab to selected line, comment those line, etc. using vi/vim.
Most standard operations that require a motion also work in visual mode, so if you select something in one of the visual modes (v, shift-v or ctrl-v), you can indent a line with the >
key, comment those lines by pressing :s@^@# @
(which will show :'<,'>s@^@# @
on the command line as the visual range is entered automatically).
Another way of commenting out blocks is to select them with the column visual select (ctrl-v) and press I
to insert at the start of the line.
:help v_>
:help visual-start
:help :s
:help I
There are also a couple of plugins here and here that help with commenting. If you want any more specific information, please can you make your question a bit more detailed as it's difficult to tell what you really want at the moment.
For indenting the selected portion of code, you can use the = command to do it automatically, or you can use the >> and << commands to increment or decrement the indenting.
Also another useful command, gv, you can use it to recover your last selection.