vim configures for normal work
"
" 主要用于保留一些常用的vim配置,省得每次都另外写,效率太低。
"
" 2015-09-18 深圳 南山平山村 曾剑锋
"
set nocompatible " be iMproved, required
filetype off " required " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'scrooloose/nerdtree'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'bufexplorer.zip'
Plugin 'wesleyche/SrcExpl'
Plugin 'winmanager'
Plugin 'scrooloose/syntastic'
Plugin 'taglist.vim'
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line " base settings "
set autoindent
set cindent
" display line number
set nu!
" 启动 vim 时关闭折叠代码
set nofoldenable
" 开启语法高亮功能
syntax enable
" 允许用指定语法高亮配色方案替换默认方案 filetype indent on
" 将制表符扩展为空格
set expandtab
" 设置编辑时制表符占用空格数
set tabstop=
" 设置格式化时制表符占用空格数
set shiftwidth=
" 让 vim 把连续数量的空格视为一个制表符
set softtabstop=
" 定义快捷键的前缀,即<Leader>
let mapleader=";"
" 定义快捷键到行首和行尾
" nmap lb 0
" nmap le $
" 设置快捷键将选中文本块复制至系统剪贴板
vnoremap <Leader>y "+y
" 设置快捷键将系统剪贴板内容粘贴至 vim
nmap <Leader>p "+p
" 定义快捷键关闭当前分割窗口
nmap <Leader>q :q<CR>
" 定义快捷键保存当前窗口内容
nmap <Leader>w :w<CR>
" 定义快捷键保存所有窗口内容并退出 vim
nmap <Leader>WQ :wa<CR>:q<CR>
" 不做任何保存,直接退出 vim
nmap <Leader>Q :qa!<CR>
" 依次遍历子窗口
nnoremap nw <C-W><C-W>
" 跳转至右方的窗口
nnoremap <Leader>lw <C-W>l
" 跳转至方的窗口
nnoremap <Leader>hw <C-W>h
" 跳转至上方的子窗口
nnoremap <Leader>kw <C-W>k
" 跳转至下方的子窗口
nnoremap <Leader>jw <C-W>j
" 定义快捷键在结对符之间跳转,助记pair
nmap <Leader>pa %
" 开启实时搜索功能
set incsearch
" 搜索时大小写不敏感
set ignorecase
" 关闭兼容模式
"set nocompatible
set backspace=indent,eol,start
" vim 自身命令行模式智能补全
set wildmenu "set U-Boot ctags tags
"set tags+=/home/zengjf/myandroid/bootable/bootloader/uboot-imx/tags "set Linux kernel ctags tags
set tags+=/home/zengjf/myandroid/kernel_imx/tags
"set tags+=/home/zengjf/parker_kernel/tags
"set tags+=/home/zengjf/inputech_kernel/tags
set tags+=/home/zengjf/myandroid/bootable/bootloader/uboot-imx/tags
set tags+=/home/zengjf/myandroid/system/core/tags
set tags+=/home/zengjf/myandroid/hardware/ril/tags "set buffer explorer shortcut
nmap <F8> :BufExplorer<cr>
nmap <c-]> g<c-]> "设置 taglist
let Tlist_Show_One_File= "只显示当前文件的tags
"let Tlist_WinWidth=40 "设置taglist宽度
let Tlist_Exit_OnlyWindow= "tagList窗口是最后一个窗口,则退出Vim
let Tlist_Use_Right_Window= "在Vim窗口左侧显示taglist窗口
let Tlist_Show_Menu= "显示taglist菜单
"let Tlist_Auto_Open=1 "启动vim自动打开taglist
nmap <Leader>tl :Tlist<cr><c-w>l "设置 winManager
"let g:winManagerWindowLayout = "BufExplorer,FileExplorer|TagList"
let g:winManagerWindowLayout = "FileExplorer"
"let g:winManagerWidth = 30
nmap <Leader>wm :WMToggle<cr><c-w>h
"在进入vim时自动打开winmanager
"let g:AutoOpenWinManager = 1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" cscope setting
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("cscope")
set csprg=/usr/bin/cscope
set csto=
set cst
set nocsverb
" add any database in current directory
if filereadable("/home/zengjf/kernel/cscope.out")
cs add /home/zengjf/kernel/cscope.out
endif
set csverb
set cscopetag
endif nmap <c-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <c-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <c-@>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <c-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <c-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <c-@>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <c-@>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <c-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>
vim configures for normal work的更多相关文章
- Vim设置colorscheme小技巧
Vim的颜色主题在/usr/share/vim/vim73/colors目录里.打开vim后在normal模式下输入":colorscheme"查看当前的主题,改动主题使用命令&q ...
- vim编辑器介绍及其常用命令
vim简单的介绍 Vim 编辑器是一个模式编辑器 . 这意味着在不同状态下编辑器有不同的行为模式 . 两个基本的模式是 Normal 模式和 Insert 模式 ,还有可视模式. 在 Normal 模 ...
- Centos6.7下面配置vim及其插件
Vim是在vi的基础上升级而来的,比vi更强大,提供代码补全,编译功能 [4]vim Vim是从 vi 发展出来的一个文本编辑器.代码补完.编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用 ...
- Linux 桌面玩家指南:02. 以最简洁的方式打造实用的 Vim 环境
特别说明:要在我的随笔后写评论的小伙伴们请注意了,我的博客开启了 MathJax 数学公式支持,MathJax 使用$标记数学公式的开始和结束.如果某条评论中出现了两个$,MathJax 会将两个$之 ...
- [No000018C]Vim清除上次的搜索高亮结果-Vim使用技巧(1)
在打开文件中使用Vim搜索功能并开启高亮显示后怎么取消当前高亮显示的目标词? 最简单的方法是再使用Vim搜索一串文档中不存在的目标词来覆盖当前高亮的搜索结果. 其实,可以在Vim尾行模式下使用 :no ...
- Vim的一些使用
Vim的三种模式 normal(普通模式) insert(插入模式) command(命令模式) Vim的工作方式不同于常规的编辑器,在常规编辑器下对应到Vim中就是一直使用insert模式进行操作, ...
- vim主题设定
Vim的颜色主题在/usr/share/vim/vim74/colors文件夹里. 打开vim后在normal模式下输入“:colorscheme”查看当前的主题,修改主题使用命令“:colorsch ...
- Vim:replace with foobar (y/n/a/q/l/^E/^Y)?
y:to substitute this match n:to skip this match a:to substitute this and all remaining matches q:to ...
- 为Python配置Vim编辑器(GUI/非GUI皆可)
原文地址:https://blog.csdn.net/alanzjl/article/details/49383943 Vim as a python IDE ** 最近一直在写Python,但一直没 ...
随机推荐
- 使用canvas画三角形
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Jmeter 之 ServerAgent 在性能测试的时候通过插件监听数据库状态
https://jmeter-plugins.org/downloads/old/ 下载几个jar包,导入到Jmeter对应到目录下/lib/ext文件夹下,注意只支持Jmeter3.2(不含)以下版 ...
- 【转】libxml2 如何获得某个节点的所有信息
网址:http://bbs.csdn.net/topics/380115580 顶楼: 我的需求是这样的,我使用libxml2从内存中解析一个xml文件,需要修改某个节点下的一个子节点,修改完成之后, ...
- Qt5.3.2_CentOS6.4_基本编程环境__20160306【勿删,繁琐】
20160306 全程没有f/q ZC:使用的虚拟机环境是:博客园VMwareSkill 的 “CentOS6.4_x86_120g__20160306.rar” 1. 执行命令“gcc -v”,显示 ...
- HttpClient的用法总结
使用HttpClient连接服务端的步骤: 1.创建HttpClient客户端对象 HttpClient client = new DefaultHttpClient(); 2.创建请求对象 ...
- Spring AMQP 源码分析 08 - XML 配置
### 准备 ## 目标 通过 XML 配置文件使用 Spring AMQP ## 前置知识 <Spring AMQP 源码分析 07 - MessageListenerAdapter> ...
- 丑数问题 Ugly Number
2018-07-28 15:30:21 一.判断是否为丑数 问题描述: 问题求解: 所谓丑数,首先得是正数,然后其质数因子只包含了2,3,4,因此我们只需要对当前的数分别除2,3,4直到不能除为止. ...
- Insert Delete GetRandom O(1)
2018-07-15 18:36:29 问题描述: 问题求解: private ArrayList<Integer> ls; private HashMap<Integer, Int ...
- js匿名函数和闭包总结
js匿名函数和闭包总结 一.总结 一句话总结:匿名函数的最主要作用是创建闭包,闭包就是将函数内部和函数外部连接起来的一座桥梁.内层的函数可以使用外层函数的所有变量,即使外层函数已经执行完毕.闭包可以用 ...
- Ubuntu 16.04下docker ce的安装
卸载版本的docker sudo apt-get remove docker docker-engine docker.io 安装可选内核模块 从 Ubuntu 14.04 开始,一部分内核模块移到了 ...