- Author: Marslo
- Email: [email protected]
- Version: 0.0.6
- LastChange: 2016-04-19 14:59:28
-
Windows User:
-
Copy vimrc from
VimConfig\Configurations\vimrc
intoC:\Program Files\Vim
, and rename vimrc to _vimrc -
Get Vundle automatically
-
Open Vim and execute (Ignore warning and errors)
:GetVundle
-
-
Get the other plugins
:BundleInstall!
-
-
Linux User:
-
Copy vimrc from
VimConfig/Configurations/vimrc
into$HOME
, and rename to .vimrc$ cp vimrc ~/.vimrc
-
Get
Vundle
and install plugins automatic:$ vim +GetVundle +BundleInstall +qa OR $ vim -c :GetVundle -c :BundleInstall -c :qa
Setup Manually
- Get [Vundle](https://github.com/gmarik/vundle.git) by command:<pre><code>$ cat .vimrc | grep "set rtp" set rtp+=$VIM/vimfiles/bundle/vundle set rtp+=~/.vim/bunle/vundle</code></pre>
-
Open Vim and Run (Ignore warnings and errors):
:GetVundle
-
Get the other plugins by command:
:BundleInstall!
-
-
Offline User:
- For vimrc file
- Windows User:
- Copy vimrc from
VimConfig\configureations\vimrc
toC:\Program Files (x86)\Vim
(64bit) orC:\Program Files\Vim
(32bit), and rename to_vimrc
- Copy vimrc from
- Linux User:
-
Copy vimrc from
VimConfig/Configuations/vimrc
into$HOME
, and rename to.vimrc
:$ cp VimConfig/Configurations/vimrc ~/.vimrc
-
OR: Create Link file to
$HOME/.vimrc
:$ ln -s <PATH_OF_VimConfig>/Configrations/vimrc ~/.vimrc
-
- Windows User:
- For bundle folder
-
Windows User: Copy bundle folder from
VimConfig/Configurations/Offline_Packages/bundle
toC:\Program Files (x86)\Vim
(64bit) orC:\Program Files\Vim
(Windows 32bit User) -
Linux User: Copy bundle folder from
VimConfig/Configureations/Offline_Packages/bundle
to$HOME/.vim
OR create link file$ cp -r VimConfig/Configureations/Offline_Package/bundle ~/.vim/ OR $ ln -s <PATH_OF_VimConfig>/Configrations/Offline_Package/bundle ~/.vim/bundle
-
- For vimrc file
- Default maximze for Win32 user
- lwmctr must be installed for linux User. Download from: http://download.csdn.net/detail/jiaoxiaogu/4317843
- F5: Run Python, Ruby and Perl by one key! (The result could be shown in the Quickfix window)
- <leader>aid: Add the personal information
+++++++++++++++++++++++++++++++++++++++++++
- Auto Pair
- Auto compare code
- <leader>fn: insert current file name
- <leader>fe: insert current file name by suffix
- <leader>tt: insert the current time
- Save and load the fold information automatic
+++++++++++++++++++++++++++++++++++++++++++
- Specified function shortcuts:
- F12: Re-build tags file
- gf: Goto File. Open file which under the cursor (Add the .py suffix while the filetype == python)
- Alt + -: Reduce the font
- Alt + +: Enlarge the font
- cmd: Open command line and cd into the current file path
- Alt + o: Open the current file browser
+++++++++++++++++++++++++++++++++++++++++++
- Plugin shortcuts:
- <leader>tl: Show the taglist
- <leader>mm: Show winmanager
- <leader>ta: Show Tagbar
- <leader>v: Open the configure file (_vimrc in windows and .vimrc in Linux)
- <leader>te: Open the Tetris
- <leader>tv: Open bash in the vim/gvim against Liunxu and open command line against Windows (Yes! That's true)
- <leader>u: Open Gundo window
- pyli: Static Code Analysis for python <<-- obsolete. Use python-mode instead of
- <leader>re: Open the most recently used files
- <leader>x: Comments/Uncomments
+++++++++++++++++++++++++++++++++++++++++++
- Emacs-style shortcuts:
- Ctrl + a: Go to begin of the line [Normal Mode && Insert Mode]
- Ctrl + e: Go to end of the line [Normal Mode && Insert Mode]
- Alt + b: Backward a word [Insert Mode] <<-- obsolete
- Alt + f: Forward a word [Insert Mode] <<-- obsolete
- Alt + d: Delete a word (backward) [Insert Mode] <<-- obsolete
- Ctrl + w: Delete a word (foreward) [Insert Mode]
- Ctrl + d: Delete a char (backward) [Insert Mode] == [Delete]
+++++++++++++++++++++++++++++++++++++++++++
- Patten shortcuts:
- <leader>zdb: Delete Backspace. Delete the backspace at the each of each line
- <leader>zhs: Delete Head Space. Delete all white space in the font of the line
- <leader>zim: Insert Number. Insert the line number
- <leader>zbl: Delete Blank Line. Delete the blank line
- <leader>zdm: Delete M. Delete
^M
() - <leader>zng: Number Global. Show the number of searched words in last time
- <leader>zbd: <200 b> Delete. Delete <200b> character
- <leader>zdd: Delete Dot. Delete character
- <leader>zid: Insert Dot. Insert a dot (•)
- AuthorInfo
- Conque Term
- MiniBufExpl
- mru
- ctrlp
- TagBar
- TagList
- TeTrIs
- WinManager
- IndentLine
- Vim Bunlde
- vim-pathogen
- supertab
- MatchTag
- txt.vim
- marslo.vim
- EnhancedCommentify | EnhancedByMarslo
- snipMate | Github | EnhancedByMarslo
- python-syntax | EnhancedByMarslo
- vim-coloresque | EnhancedByMarslo
- Rainbow Parentheses Improved | Vim | Another Version
- vim-css3-syntax | Bug-Cannot work
- css.vim
- scss-syntax.vim
- perl-support.vim
- tlib
- vim-addon-mw-utils
- vim-css-color # Cannot work for vim74, using vim-colorsque instead
- emmet.vim
- ruby-matchit
- Rainbow Parentheses # Replaced by Rainbow Parentheses Improved
- gui2term.py
- colorsel.vim
+++++++++++++++++++++++++++++++++++++++++++
The default Font named: Monaco, download form: http://download.csdn.net/detail/jiaoxiaogu/4317959
###使用方法
-
Windows用户
-
复制 Configurations\vimrc 到
C:\Program Files (x86)\Vim
, 且重命名为_vimrc
-
自动获取 Vundle
-
打开vim(忽略错误或警告)
:GetVundle
-
-
获取其他插件
:BundleInstall!
-
-
Linux 用户:
-
复制 Configurations/vimrc 到
$HOME
, 且重命名为.vimrc
$ cp Configurateions/vimrc ~/.vimrc
-
自动获取 Vundle
-
打开Gvim且运行 (忽略错误或警告)
:GetVundle
-
-
获取其他插件
:BundleInstall!
-
-
离线用户 (无法使用git用户):
-
对于vimrc 而言:
- Windows用户: 复制 VimConig\Configurations\vimrc 到
C:\Program Files (x86)\Vim
(64位) 或C:\Program Files\Vim
(32位), 且重命名为_vimrc
- Linux用户:
-
复制 VimConfig/Configurations/vimrc 到
$HOME
, 且重命名为.vimrc
$ cp VimConfig/Configurations/vimrc ~/.vimrc
-
或创建link文件
$HOME/.vimrc
$ ln -s <PATH_OF_VimConfig>/Configrations/vimrc ~/.vimrc
-
- Windows用户: 复制 VimConig\Configurations\vimrc 到
-
对于 bundle 目录
-
Windows用户: 复制
VimConfig/Configurations/Offline_Packages/bundle
目录到C:\Program Files (x86)\Vim
(64位) 或C:\Program Files\Vim
(32位) -
Linux用户: 复制
VimConfig/Configureations/Offline_Packages/bundle
到$HOME/.vim
或创建链接文件$ cp -r VimConfig/Configureations/Offline_Package/bundle ~/.vim/ OR $ ln -s <PATH_OF_VimConfig>/Configrations/Offline_Package/bundle ~/.vim/bundle
-
-
- Windows用户, 已默认开启最大化
- Linux用户,需要安装
lwmctr
。下载地址:http://download.csdn.net/detail/jiaoxiaogu/4317843
F5
: 一键运行Python, Ruby 和 Perl。(运行结果将显示在Quickfix窗口中)
+++++++++++++++++++++++++++++++++++++++++++
- 自动配对
- 自动添加信息:
- fn: 添加当前文件名(无后缀,方便Java添加类名)
- fe: 添加当前文件名(有后缀,方便添加注释)
- tt: 添加当前时间
- 自动保存和加载折叠信息
+++++++++++++++++++++++++++++++++++++++++++
- 自定义函数快捷键
- F12: 重新生成tags文件
- gf: 打开光标下的单词为文件名 (若是python文件,则自动添加.py为后缀)
- Alt + -: 缩小字体
- Alt + +: 增大字体
- cmd: 打开命令行,且自动cd到当前文件目录(Linux打开的为Terminal,Windows打开的为command line)
- Alt + o: 打开文件浏览器, 且自动进入当前文档的目录 (Linux打开为Nautilus, Windows打开为Explorer)
+++++++++++++++++++++++++++++++++++++++++++
- 插件快捷键
- <leader>aid: 自动添加用户信息
- <leader>tl: 显示taglist
- <leader>mm: 显示winmanager(附带taglist信息)
- <leader>ta: 显示Tagbar
- <leader>v: 打开配置文件(_vimrc/.vimrc)
- <leader>te: 打开俄罗斯方块游戏(练习hjkl快捷键)
- <leader>tv: 在vim/gvim中运行bash(是的,你没看错!)
- <leader>u: 打开Gundo窗口
- pyli: Python静态代码分析(规范代码,远离砍手砍脚)
- <leader>re: 打开最近文件列表(10个)
- <leader>x: 注释/反注释
+++++++++++++++++++++++++++++++++++++++++++
- Emacs 风格快捷键
- Ctrl + a: 光标移动到行首 [Normal模式 && 插入模式]
- Ctrl + e: 光标移动到行尾 [Normal模式 && 插入模式]
- Alt + b: 光标向前跳动一个单词 [插入模式]
- Alt + f: 光标向前跳动一个单词 [插入模式]
- Alt + d: 向前删除一个单词 [插入模式]
- Ctrl + w: 向后删除一个单词 [插入模式]
- Ctrl + d: 向后删除一个字符 [插入模式]
+++++++++++++++++++++++++++++++++++++++++++
- 正则表达式快捷键
- <leader>zdb: Delete Backspace. 删除行尾空格
- <leader>zhs: Delete Head Space. 删除行前空白(缩进,空格,等)
- <leader>zim: Insert Number. 插入文档行号
- <leader>zbl: Delete Blank Line. 删除空行
- <leader>zdm: Delete M. 删除
^M
() 字符 - <leader>zng: Number Global. 显示最后一次搜索内容的个数
- <leader>zbd:
<200**b**>
Delete. 删除字符<200b>
- <leader>zdd: Delete Dot. 删除
·
字符 - <leader>zid: Insert Dot. 插入一个点 (
•
)
- AuthorInfo
- Conque Term
- MiniBufExpl
- mru
- ctrlp
- TagBar
- TagList
- TeTrIs
- WinManager
- IndentLine
- vim-pathogen
- supertab
- MatchTag
- txt.vim
- marslo.vim
- EnhancedCommentify | Marslo增强版
- snipMate | 原Github地址 | Marslo
- python-syntax | Marslo增强版
- vim-coloresque | Marslo增强版
- perl-support.vim
- tlib
- vim-addon-mw-utils
- vim-css-color # 不支持Vim74, 使用vim-colorsque 替代
- emmet.vim
- Rainbow Parentheses # 已经替换成 Rainbow Parentheses Improved | Github repo
- colorsel.vim
- gui2term.py
+++++++++++++++++++++++++++++++++++++++++++
默认字体为: Monaco, 下载地址: http://download.csdn.net/detail/jiaoxiaogu/4317959
Download source from:
-
$ git clone [email protected]:vim/vim.git $ git clone https://github.com/vim/vim.git
-
$ git clone [email protected]:b4winckler/vim.git $ git clone https://github.com/b4winckler/vim.git
-
$ git clone [email protected]:vim-jp/vim.git $ git clone https://github.com/vim-jp/vim.git
- libatk1.0-dev
- libbonoboui2-dev
- libcairo2-dev
- libgnome2-dev
- libgnomeui-dev
- libgtk2.0-dev
- libncurses5-dev
- libxpm-dev
- libx11-dev
- libxt-dev
$ sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
- Installation directories:
--prefix=PREFIX
: install architecture-independent files in PREFIX Default directory: [/usr/local]
- Optional Features:
--enable-gui=OPTS
: X11 GUI default=auto OPTS=auto/no/gtk2/gnome2/motif/athena/neXtaw/photon/carbon--enable-gnome-check
: If GTK GUI, check for GNOME default=no--enable-fontset
: Include X fontset output support--enable-xim
: Include XIM input support--enable-cscope
: Include cscope interface--enable-pythoninterp=OPTS
: Include Python interpreter. default=no OPTS=no/yes/dynamic--enable-python3interp=OPTS
: Include Python3 interpreter. default=no OPTS=no/yes/dynamic--enable-rubyinterp=OPTS
: Include Ruby interpreter. default=no OPTS=no/yes/dynamic--enable-multibyte
: Include multibyte editing support
- Optional Packages:
--with-x
: use the X Window System--with-compiledby=NAME
: name to show in :version message--with-features=TYPE
: tiny, small, normal, big or huge (default: normal)
$ cd vim
$ ./configure --with-x --enable-gui=gnome2 --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --enable-pythoninterp=yes --enable-rubyinterp=yes --enable-python3interp=yes --prefix=/home/marslo/Tools/Software/vim74/ --with-compiledby=Marslo --enable-gnome-check
$ make
$ sudo make install
$ cat >> ~/.bashrc << EOF
> export PATH=/home/marslo/Tools/Software/vim74/:$PATH
> EOF
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 25 2013 15:31:13)
Included patches: 1-35
Compiled by Marslo
Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
....
-
Copy
applications/gvim.desktop
andapplication/defaults.list
to/usr/share/applications/
:$ cp /usr/share/applications/defaults.list /usr/share/applications/defaults_bak.list` $ cp applications/gvim.desktop /usr/share/applications/ $ cp -f applications/defaults.list /usr/share/applications/
-
Make gvim.desktop can find the gvim icon (it will be shown as bellow):
$ cat gvim.desktop ... Icon=/home/marslo/Tools/Software/Vim/applications/gvim.png ...
-
An fully gvim.desktop
4.1 ncurses:
-
Problem:
no terminal library found You need to install a terminal library; for example ncurses. Or specify the name of the library with --with-tlib.
-
Soluction:
-
For Ubuntu/Debain:
$ sudo apt-get install libncurses5-dev
-
For RHEL/CentOS:
$ sudo yum install ncurses-devel
-
4.2 C compiler
-
Problem:
no acceptable C compiler found in $PATH
-
Soluction:
-
For Ubuntu/Debain:
$ sudo apt-get update && sudo apt-get install build-essential
-
-
Problem:
"fatal: Unable to find remote helper for 'http'"
-
Soluction:
-
Fur Ubuntu/Debain:
$ sudo apt-get install libcurl4-openssl-dev
-
- Dev stuff:
- Mandatory
- gcc / gcc-g++
- make
- ncurses
- bc (Math)
- Optional
- Flex
- bison
- gettext / gettext-devel
- textinfo
- Other
- wget
- curl
- tree
- rsync
- scp
- lynx
- Using apt-cyg to install cygwin package
- $ wget http://rawgit.com/transcode-open/apt-cyg/master/apt-cyg
- $ mv apt-cyg{.txt,}
- $ install apt-cyg /bin
- Mandatory
-
For GVIM:
$ make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
-
For VIM:
$ make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
-
For Linux (RHEL) with python:
$ LD_LIBRARY_PATH=/usr/local/lib/python2.7 PATH=/usr/local/bin:$PATH ./configure --prefix=$HOME/.marslo/myprograms/vim74 --enable-pythoninterp=yes --with-python-config-dir=/usr/local/lib/python2.7/config/ --enable-rubyinterp=yes --with-features=huge --disable-smack --with-compiledby=marslo@appliance