"
" 主要用于保留一些常用的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的更多相关文章

  1. Vim设置colorscheme小技巧

    Vim的颜色主题在/usr/share/vim/vim73/colors目录里.打开vim后在normal模式下输入":colorscheme"查看当前的主题,改动主题使用命令&q ...

  2. vim编辑器介绍及其常用命令

    vim简单的介绍 Vim 编辑器是一个模式编辑器 . 这意味着在不同状态下编辑器有不同的行为模式 . 两个基本的模式是 Normal 模式和 Insert 模式 ,还有可视模式. 在 Normal 模 ...

  3. Centos6.7下面配置vim及其插件

    Vim是在vi的基础上升级而来的,比vi更强大,提供代码补全,编译功能 [4]vim Vim是从 vi 发展出来的一个文本编辑器.代码补完.编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用 ...

  4. Linux 桌面玩家指南:02. 以最简洁的方式打造实用的 Vim 环境

    特别说明:要在我的随笔后写评论的小伙伴们请注意了,我的博客开启了 MathJax 数学公式支持,MathJax 使用$标记数学公式的开始和结束.如果某条评论中出现了两个$,MathJax 会将两个$之 ...

  5. [No000018C]Vim清除上次的搜索高亮结果-Vim使用技巧(1)

    在打开文件中使用Vim搜索功能并开启高亮显示后怎么取消当前高亮显示的目标词? 最简单的方法是再使用Vim搜索一串文档中不存在的目标词来覆盖当前高亮的搜索结果. 其实,可以在Vim尾行模式下使用 :no ...

  6. Vim的一些使用

    Vim的三种模式 normal(普通模式) insert(插入模式) command(命令模式) Vim的工作方式不同于常规的编辑器,在常规编辑器下对应到Vim中就是一直使用insert模式进行操作, ...

  7. vim主题设定

    Vim的颜色主题在/usr/share/vim/vim74/colors文件夹里. 打开vim后在normal模式下输入“:colorscheme”查看当前的主题,修改主题使用命令“:colorsch ...

  8. 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 ...

  9. 为Python配置Vim编辑器(GUI/非GUI皆可)

    原文地址:https://blog.csdn.net/alanzjl/article/details/49383943 Vim as a python IDE ** 最近一直在写Python,但一直没 ...

随机推荐

  1. java 使用正则判断是不是一个数字

    public class Numeric { public static void main(String[] args) { String string = "-1234.15" ...

  2. Beta冲刺

    第一天 日期:2018/6/24 1 今日完成任务情况. 妥志福.牛瑞鑫: 完成任务:数据库设计完成数据导入成功 王胜海.马中林: 完成任务:代码规范检查 董润园.邓英蓉: 完成任务:平台基本功能黑盒 ...

  3. Android Intent参数传递

    Android Intent参数传递 Android参数传递有两种方式, 1.是从一个Activity传递参数到第二个Activity并在第二个Activity获取数据 2.是从第二个Activity ...

  4. Shiny+SQLite打造轻量级网页应用

    参考: R语言核心技能:交互式展示Shiny  中文 R语言用Shiny包快速搭建交互网页应用  R七种武器之交互化展示包shiny 用R的shiny包写一个基因的ID转换小程序 https://gi ...

  5. RabbitMq windows 安装

    参考官方网址: http://www.rabbitmq.com/install-windows-manual.html http://www.rabbitmq.com/install-windows. ...

  6. Confluence 6 导入 Active Directory 服务器证书 - Windows

    为了让你的应用服务器能够信任你的目录服务器.你目录服务器上导出的证书需要导入到你应用服务器的 Java 运行环境中.JDK 存储了信任的证书,这个存储信任证书的文件称为一个 keystore.默认的 ...

  7. hdu-4678-sg

    Mine Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submis ...

  8. shell里的/dev/null 2>&1详解

    shell中可能经常能看到: >/dev/null 2>&1 命令意思是:标准输出stdout 和标准错误输出stderr 也重定向到空设备文件,即不显示输出信息 分解这个组合:“ ...

  9. 无法打开物理文件“xxxx.mdf”。操作系统错误 5:“5(拒绝访问)”

  10. DIV字体

    1.如何设定文字字体.颜色.大小 —— 使用font font-style设定斜体,比如font-style: italicfont-weight设定文字粗细,比如font-weight: bold; ...