Vim
From Augix' Wiki
Contents |
Learning Vim
- [Graphical vi-vim Cheat Sheet and Tutorial http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html]
- indent in multiple lines
- way1: enter visual mode, use ">" or "<" to increase or decrease indent
- way2: use "==" to give indent to the current line, use "n==", n is a number: to give indent to the following lines until line number n.
- #
the # key create a motion jumping from the current word to the same word in the current buffer
Tips
- To change to the directory of the current file:
:cd %:h
- To show the key mappings
:map
- Moving around, scroll up and down the screen
CTRL-F CTRL-B CTRL-U CTRL-D CTRL-E CTRL-Y
- Jumping
One can use CTRL-O or CTRL-I jumping to older cursor position or newer position. One can also use
:ju
to print the jump list.
- Show invisible characters
:set list
- Hide invisible characters
: set nolist
- Disable all blinking:
:set guicursor+=a:blinkon0
Files and Tabs
- create a new tab
:tabnew
- switch to next tab
gt
or
:tabn
Plugins
- How to install a Vimball plugin (with .vba extension)?
Open the vba file with vim, and type the :source % command right there. The % refers to the current file
- install Taglist plugin: http://vim-taglist.sourceforge.net/installation.html
- to use TagList correctly, one has to correctly point out the folder contain 'ctags'. For example:
let g:Tlist_Ctags_Cmd='~/bin/ctags/bin/ctags'
- echo function: http://blog.csdn.net/wooin/archive/2007/12/30/2004470.aspx
$ ctags -R --fields=+lS . /picb/home5/augix/Programming/ /picb/compbio5/augix/cDNA/
- the ctgas command line I used in MPI-EVA
$ ctags -R ./Programming/ ./Research/
- gvim color scheme, in ~/.gvimrc
" by augix " color scheme: desert colorscheme desert
- python debugger
- VOoM
Show outline table on the left
- VimWiki
personal wiki with vim.
Vim with Python
- 增强gvim适合python开发的相关配置
- 用vim搭建python开发环境
- Debugging Python in VIM
- checking errors: pyflakes.vim : PyFlakes on-the-fly Python code checking
- Vim as Python IDE
Write .vim file
- stop loading the current .vim file
" disable it in MacVim
if has('gui_macvim')
finish
endif
Send selected lines to a screen
- Install
One only need to copy send.vim and send2screen.py to the right directory.
http://www.vim.org/scripts/script.php?script_id=2104
http://www.vim.org/scripts/script.php?script_id=1048
http://users.physik.fu-berlin.de/~mgoerz/blog/2008/09/integrating-vim-with-ipython/

