Introduction to vi editor

The vi editor is the classic screen editing program for Unix systems and is based on a older line editor called ex. It can be used from any type of terminal because it doesn’t depend on arrow and function keys. It uses standard alphabetic keys for command as well as arrow keys.

There are number of enhanced version of vi exists. Some of them are nvi, vim, vile and elvis. In Linux, the vi command is a link to one of these programs. Most likely it will be vim. Most of the Linux distributions have vi and emacs text editor already installed.
In Linux, configuration files are written in plain English. Hence, text editors are required to make changes to these files. The editing capabilities can be invoked within vi by pressing the colon (:), entering ex command and then pressing the Return key. ex commands are still important part of vi and is sometimes called hex in Linux.

Learning vi or emacs is must for every Linux or Unix user. There are some GUI based text editors available. But, there are some situations when you can’t access GUI desktop. In that case, vi or emacs can only save you.
The version which people use normally now a days is Vi iMproved (VIM). Vi was enhanced by Bram Moolenaar and are called vim editor.

The vi editor has three modes, command mode, insert mode and command line mode.
1.Command mode: by default, the vi editor opens in command mode. You can use commands to move cursor, delete. cut, copy, paste and save changes. Commands are case sensitive. The ESC key is used to end a command.

2. Insert mode: Insert mode is what we work in most of the time and text is inserted into the file in this mode only. You can enter the insert mode by pressing “I” key. The newer vi versions will show “INSERT” word on the bottom line. You can also enter "a" (insert after), "A" (insert at end of line), "o" (open new line after current line) or "O" (Open line above current line) commands apart from “I” command. The ESC key ends insert mode and returns you to command mode.
3.Command line mode: You can enter this mode by typing ":" which displays the command line entry at the bottom of the screen.
Note: In broad sense, there are only two modes, one for editing text (i.e. Insert mode) and the other (i.e. command mode) for giving commands. To switch between the two modes you use the “I” and “Esc” keys.

Starting vi
1. To start Vi, open a terminal or console and simply type vi filename (for existing file) or vi newfile (newfile will be name of your new file)

2. The file will open in command mode.
3. Type “I” to go to Insert mode and add your text in the file.

4. Once you are done editing the file, Press “ESC” to go to command mode and save your changes to the file. Press “Shift+ZZ” to save the file. Alternatively, you can use command line mode to issue command to save the file.

Swap file:
Swap files has .swp extension. Swap file is automatically created when you make mistake in saving file. Mistake like issuing wrong command CNTRL+ZZ instead of SHIFT+ZZ. It is similar to temp files in Windows or DOS. .swp file will be in addition to your original file. In this case, the original file will not contain the recent changes.

Command to recover from swap file: Type the following command at the $ prompt and press ENTER

vi -r {file name}

You must delete the swap file after recovery: Type following command at the $ prompt and press ENTER

rm .{file name}.swp
Moving the cursor: This command only works when you are in command mode. The cursor is controlled with four keys: h, j, k, l.
h – one space left

j – one line down
k – one line up

l – one space right

Note: If you were in Insert mode, Press ESC to go to command mode.
official site for vim:

Website Promotion

Unfortunately, there is no shortcut way to get traffic to your website. You need to work actively and follow the guidelines mentioned below for that. I believe that your website is ready and online. Next thing is to promote your site so that you can attract traffic towards your website. Only free and reliable methods are discussed to promote your site and which will bring traffic to your site.

1. Get your site work properly: This is very important thing to consider. Before you start promoting your site, you should make sure that your site is complete and well-structured. Otherwise, you won’t be able to retain the incoming visitors.

2. Optimize your site for Search Engines: After your site is ready for human, now the time has come to make it good for search engine so that spider can understand it and give it better ranking in search engine. Read Site Optimization for Search Engines to get more idea about it. This is one of the best and free ways to get visitors to your website. You should optimize your website to get better ranking in search engine. There are only 3 major search engines- Google, Yahoo and MSN and you should try to get listed into them. Submit your site to Google, Yahoo and MSN.

3. Hand Submit to Search Engines: I strongly feel that you should submit your site manually to search engines. Search Engines may punish your site for automatic submission if you are using any robotic submission. Submit your site manually to Google, Yahoo and MSN.

4. Hand Submit to Directories: There are many directories but two of them are very famous. DMOZ and Yahoo Directory is the most preferred directory for Google.

DMOZ (Open Directory): This is a human-edited directory and it's important because Google gets some of its results from DMOZ and listings in DMOZ carry a lot of link weight with Google. Submit your site in right category and don’t submit more than once. That is very important and if you do, you will get banned for spamming and your site will never be listed. Another important thing is that make sure your site is ready before you submit it.

Yahoo Directory: This is another directory which also carries lot of weight link with Google. But it costs $299/year for a product or sales site to be listed in Yahoo. That doesn't guarantee a listing either. It is free for non-commercial sites.

5. Links Exchange: The more sites that link to your site the higher your ranking in Google and some of the other search engines will be, but not all links are created equal. A link from DMOZ is a great link to get. Links from Free for All links pages are worthless. You should exchange links with people that have a website on a topic that's related to what your website is about. Otherwise, there is no use of that. That will not help you in SERP(Search Engine Ranking Page).
6. Paid Advertisement on Pay Per Click Search Engines: This is easy and fast way to attract traffic to your site. But it costs money. If you have budget then this is good option to go for. The beauty of PPCs is that you don’t have to wait for weeks and months to achieve a top ranking for your keyword. Technically, listing is free. Your ad will appear on Google, Yahoo and other search engine and you only have to pay for clicks not for page impression.

Clear History and Cookies in MS Edge

With the launch of Microsoft Edge browser, you will soon across this browser. Once you strat using it, you also need to know wher the information is stored in MS Edge browser and how to remove them when necessary.

Follow the steps below:
  1. Open the MS Edge
  2. In the top right of the Window, hit the icon with three horizontal dots to open the more menu
  3. Click on the Settings tab at the bottom of the more menu
  4. Under the "Clear browsing data", hit the botton - "Chise what to clear"
  5. Check the boxes that you want to delete. you can also see full list of options by clicking the drop down tab that says "SHow more"
  6. Then, Hit "Clear"
  7. You have successfully deleted the selected items