Some Trick for VIM

September 4th, 2006 liewsheng

When I converting a e-code to SystemVerilog syntax, I realize that I don’t like the format created by the script. The script creating port which group them under a line, but I like them if they separte in different line for different port. So I need to replace some special character with a new line. [...]

Posted in vi, vim | Hits: 12839 | 2 Comments »

split windows view in vim

August 21st, 2006 mysurface

Sometimes you would likes to have split view. You can compare the codes at the same time on the same screen. So when switching tabs or buffer is not convenience to you, you can consider to open more split windows. To open another windows, and lead you to current directory for file selection, you can [...]

Posted in Text Manipulation, vi, vim | Hits: 35868 | No Comments »

open multiple files in tabs, vim 7 can do that.

August 16th, 2006 mysurface

Remember last time when I open multiple files using vim, it will be loaded and store at the back buffer, in order to bring it to front, you need to first save your current file with :w then :bn for next :bp for previous. But seems vim 7 support tabs, I would like to open [...]

Posted in alias, Text Manipulation, vi, vim | Hits: 52540 | 12 Comments »

key mapping of vim 7

August 15th, 2006 mysurface

vim is a very popular editor which it have more than one mode, and it is flexible to allow you for mapping your key to the features. The common map keywork is :map, which the key is map and functional when you are in normal, visual mode. To make a key to edit a file [...]

Posted in Text Manipulation, vi, vim | Hits: 14359 | 4 Comments »

tabs in vim 7

August 15th, 2006 mysurface

This was amazing when I get to know that vim can do tab. Okay to do that, it is easy, what you need is to do a key binding. Create a file .vimrc into your home folder, and paste the lines bellow into it. :map <F4>:tabprevious<cr> :map <F3>:tabnext<cr> :map <C-t>:tabnew .<cr> :imap <F4>:tabprevious<cr>i :imap <F3>:tabnext<cr>i [...]

Posted in ln, Text Manipulation, vi, vim, which | Hits: 30309 | 2 Comments »

searching man page inside vi editor

August 4th, 2006 mysurface

This is a tips provided by my friend durian. In order to search for man page while you are viewing either script or source code using vi editor, you can search for man page without quiting vi editor. put your cursor over the keyword which you want to look up, and press shift-K Let say [...]

Posted in Text Manipulation, vi, vim | Hits: 22705 | 3 Comments »