Saturday, May 14, 2011

Dig into VIM

Input :h! in vim , what u find!?
Then :h 42 ....

quick command : http://jrmiii.com/attachments/Vim.pdf

vim cookbook: http://vim.runpaint.org/

U can also use vim in eclipse http://eclim.org/

Make vim easier to use: http://vim-taglist.sourceforge.net/installation.html (CTAGS needed)

Split screen :http://coolshell.cn/articles/1679.html

Make vim for perl : http://www.thegeekstuff.com/2009/01/make-vim-as-your-perl-ide-using-perl-supportvim-plugin/
Hot Keys : http://lug.fh-swf.de/vim/vim-perl/perl-hot-keys.pdf
#perltidy is a powerful tool to auto format the code, the hot key is \ry

Scripts : http://www.vim.org/scripts/script_search_results.php?order_by=rating

A modern vim for new guys: http://cream.sourceforge.net/index.html



My .vimrc:

set nocompatible
set mouse=a
behave mswin


syntax on
filetype on
filetype indent on
filetype plugin on


map  <space> :
map  <C-j> <C-w><down>
map  <C-k> <C-w><up>
map  <C-h> <C-w><left>
map  <C-l> <C-w><right>
imap <C-j> <down>
imap <C-k> <up>
imap <C-h> <left>
imap <C-l> <right>


let mapleader=";"
map <leader>w :w!<cr>
map <leader>q :close<cr>
map <leader>[ <C-o>
map <leader>] <C-]>
map <leader><space> <C-w>


map <leader>j :bn<cr>
map <leader>k :bp<cr>
map <leader>bd :bd<cr>


map <leader>tn :tabnew<cr>
map <leader>l  :tabn<cr>
map <leader>h  :tabp<cr>
map <C-t>      :tabnew<cr>
map <C-tab>    :tabn<cr>
map <C-S-tab>  :tabp<cr>


map <silent> <leader><cr> :noh<cr>


map <leader>tl :TlistToggle<cr>
map <leader>gf :NERDTree<cr>


set history=50
set autoread
set ts=4
set expandtab
set smarttab
set shiftwidth=4
set autoindent
set smartindent
set cindent
set scrolloff=5
set wildchar=<Tab>
set wildmenu
set cmdheight=1
set ruler
set nu
set lz
set hid
set whichwrap+=<,>,h,l
set ignorecase
set incsearch
set magic
set showmatch
set hlsearch
set laststatus=2
set statusline=\ %P\ %F%m%r%h\ %y\ %w\ \ CWD:\ %{getcwd()}%h\ \ Line:\ %l/%L:%c
set showmatch
set showmode

No comments:

Post a Comment