The proposal is very simple: convert the g: word to https://www.google.com/search?q= word, w: word into http://en.wikipedia.org/wiki/ word and into: word at http: / /ru.wikipedia.org/wiki/word
For expressions use quotes: g: "two words".
Just very tired first to search for the necessary articles, and then wrap the text in long links.