About Me

My photo
जिंदगी की परीक्षा में कोई नम्बर नहीं मिलते है लोग आपको दिल से याद करे तो समझ लेना आप पास हो गए....

Monday 5 June 2017

Vimuseful commands

1) :0 - move to first line (or 1 then shift+g ie. 1G means Go to line1 similarly 2G means 2nd line)
2) :$ - move to last line (or shift+g)
3) :q - quit a file 
4) Delete a char
    a) Get back to normal mode by pressing ESC
    b) Move the cursor over the char to be deleted and press x
5) move a line
   a) Get back to normal mode by pressing ESC
   b) Move the cursor over the line to be moved  Use dd to delete the line, then use p to paste it repeatedly into the document.

6)The commands to move one screen at a time are Ctrl-F (Forward) and Ctrl-B (Backward).
7)search:  which involves typing slash / followed by the string you want to find. The trick is to type /<string> followed by return, and then press n to go to the next match (if any).


Note: ls -hartl - useful for seeing which files and directories have recently changed

 human-readable values for the sizes (e.g., 29K instead of 29592 for a 29-kilobyte file), including all of them (even hidden ones),
ordered by reverse time,
long form.

Beautiful Lines : The classes are used mainly for styling, while the ids are included mainly to manipulate the Document Object Model (DOM) with JavaScript  

No comments:

Post a Comment