vim 环境配置
来源:互联网 发布:淘宝封号能自动解封吗 编辑:程序博客网 时间:2024/06/04 09:14
为了方便学习开源的项目,尝试折腾了下vim的配置,配置还算顺利,留个笔记备忘 https://github.com/robertzhai/vim
1. 安装 pathogen
https://github.com/tpope/vim-pathogen
2.安装nerdtree,command-t,taglist,vim-powerline,vim-sensible 这5个插件,还有 ctags 编译安装
3. 安装效果图
tree -L 2 .vim
.vim
├── autoload
│ └── pathogen.vim
├── bundle
│ ├── command-t
│ ├── nerdtree
│ ├── taglist
│ ├── vim-powerline
│ └── vim-sensible
└── doc
3. vimrc 文件配置
set backupdir=/tmp directory=/tmp
set modeline si ai incsearch sw=4 ts=4 history=64 encoding=UTF-8
set formatoptions-=t textwidth=76 "only wrap when in comment
set nohlsearch
set noswapfile
set ruler
set ignorecase
set modeline
set number
"encoding
set fileencodings=utf-8
set termencoding=utf-8
" Fix Backspace for MacOSX
set backspace=indent,eol,start
filetype on
syntax enable
syntax on
" Highlight trailing white-spaces
let c_space_errors=1
autocmd Syntax * syn match ExtraWhitespace /\s\+$/
"set t_Co=256
"colorscheme desert256
"colorscheme ron
colorscheme desert
let Tlist_Ctags_Cmd='/usr/local/bin/ctags'
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Show_Menu=1
"pathogen
execute pathogen#infect()
filetype plugin indent on
"NERDTree快捷键
nmap <F2> :NERDTree <CR>
"commandt快捷键
nmap <F3> :CommandT <CR>
"taglist
nmap <F4> :TlistToggle <CR>
"powerline{
set guifont=PowerlineSymbols\ for\ Powerline
set nocompatible
set t_Co=256
let g:Powerline_symbols = 'fancy'
"}
4. 效果
cd phpsource/php-5.5.36
ctags -R * 生成tags
输入vim按f2打开导航
选中main.c
鼠标移动到一个宏行按cmd+】 跳转到定义的地方,按ctrl+t 返回
搜索文件
按f3 输入文件名即可搜索
按f4即可看到相关的变量和函数
效果图见后
参考:http://hessian.cn/p/1026.html
- vim环境配置
- 配置vim python 环境
- 配置vim python 环境
- vim 环境配置
- 配置vim python 环境
- 配置python vim 环境
- vim 环境配置
- 配置 VIM 开发环境
- vim+go环境配置
- vim环境配置
- VIM配置Python环境
- vim环境配置spf13
- 配置vim环境
- VIM开发环境配置
- vim 环境配置
- Vim 开发环境配置
- vim开发环境配置
- vim的环境配置
- 关于搭建Linux项目运行环境
- C#获取IP
- HDU 1710 Binary Tree Traversals
- bean的加载(七)创建bean
- Shader Depth Offset [Polygon Offset]
- vim 环境配置
- 用平方根判断素数
- java实现Http协议
- 环境变量
- HDU 1392 Surround the Trees
- Shell脚本中计算字符串长度的5种方法
- 指针p,q,r依次指向某循环链表中三个相邻的结点,交换结点*q,*r在表中次序的程序段是
- 跳转微信
- 用swoole扩展编写WebSocket聊天室