"
" 主要用于保留一些常用的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. 分析 HTML 代码并提取数据

    在前面的内容中,我们已经学习了 HTML.CSS 和 XPath 的基础知识.从真实世界的网页中获取数据,关键在于如何编写合适的 CSS 或者 XPath 选择器.本节介绍一些确定选择器的简单方法.假 ...

  2. STL_容器使用时机

    1. 来自教程: ◆ Vector的使用场景:比如软件历史操作记录的存储,我们经常要查看历史记录,比如上一次的记录,上上次的记录,但却不会去删除记录,因为记录是事实的描述. ◆ deque的使用场景: ...

  3. c++ primer plus 第五章 课后题答案

    #include <iostream> using namespace std; int main() { ; cout << "Please enter two n ...

  4. rem的计算

    (function (doc, win) { console.log("dpr:"+win.devicePixelRatio); var docEle = doc.document ...

  5. Kafka特性

    ———————————————————————————————————————————————— [关键原理] 1.消息文件存储(消息堆积能力) 2.消息topic分区 3.消息顺序的保证 4.拉模型 ...

  6. C#复制文件

    string pLocalFilePath ="";//要复制的文件路径 string pSaveFilePath ="";//指定存储的路径 if (File ...

  7. 敏感性、特异性、假阳性、假阴性(sensitivity and specificity)

    医学.机器学习等等,在统计结果时时长会用到这两个指标来说明数据的特性. 定义 敏感性:在金标准判断有病(阳性)人群中,检测出阳性的几率.真阳性.(检测出确实有病的能力) 特异性:在金标准判断无病(阴性 ...

  8. English trip -- VC(情景课)9 B Outside chores 室外家务

    Vocabulary focus 核心词汇 cutting the grass 修剪草坪 getting the mail  收到邮件 taking out the trash  把垃圾带出去 wal ...

  9. hdu2328 kmp

    Beside other services, ACM helps companies to clearly state their “corporate identity”, which includ ...

  10. python-day11--函数

    1.为什么要有函数,函数得作用: 解决代码冗余.可读性差.可扩展性差(不易修改)的问题. 2.函数得定义: def 函数名(): '''注释'''     #(注释这个函数的作用) 函数体 返回值 3 ...