There is a plugin called vigedit which provides vi emulation for gedit.
First execute following command to checkout the source from bazaar repo.
bzr branch http://bazaar.launchpad.net/~tristil/vigedit/main-method
Now go inside main-method folder and execute following command.
Now open your gedit and goto Edit > Preferences > Plugins and check vigedit. Your gedit will turn into basic vi editor.