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,但一直没 ...
随机推荐
- Python将某文件夹及其子文件夹下某种格式的文件移动到另一个指定的文件下
主要是理解好上面的1~3点的内容,理解三个返回值所代表的意思.如果不清楚的话,可以在代码的for循环的第一句注释输出看看各个代表的是什么 再者就是对 shutil.copy(file_path,new ...
- 《剑指offer》第十八题(在O(1)时间删除链表结点)
// 面试题18(一):在O(1)时间删除链表结点 // 题目:给定单向链表的头指针和一个结点指针,定义一个函数在O(1)时间删除该 // 结点. #include <iostream> ...
- C# ref和out的本质
ref和out参数的效果一样,都是通过关键字找到定义在主函数里面的变量的内存地址,并通过方法体内的语法改变它的大小.不同点就是输出参数必须对参数进行初始化.输出参数和引用参数的区别:从CLR的角度来看 ...
- 雷林鹏分享:C# 属性(Property)
C# 属性(Property) 属性(Property) 是类(class).结构(structure)和接口(interface)的命名(named)成员.类或结构中的成员变量或方法称为 域(Fie ...
- WPF 元素的查找
预设置元素名字 WPF有两种方式设置元素的Name <StackPanel x:Name="panel"> <Label Name="name1&quo ...
- English trip -- VC(情景课)1 D
Read 阅读 Welcome! Meet our new student. His first name is Ernesto. 欧内斯托 His last name is Delgado. 德尔 ...
- Dajngo的CBV和FBV
CBV: class. base. view 路由: url(r'students/', views.StudentsView.as_view()) 视图: from django.views imp ...
- priority_queue与bfs不得不说的古寺
前几天写到bfs,看到之前写的,突然感觉不对,后来发现自己把点权值默认当成了边权值,导致一直走不出来: 点权值嘛,就是经过这个点时,要付出这么多的代价,边权值则是经过边时付出,二者有区别滴: 边权值求 ...
- $LANG、$NLS_LANG 记录一下
环境:linux $LANG 为linux termal终端环境下的 语言环境 $NLS_LANG 为oracle数据库中 会话中的语言环境. 个人理解,望大家补充
- Leetcode 784
//这代码可真丑陋,但我学到了两点1:char和string可以无缝互相转换2:char可以直接加减数字进行转换string不行 class Solution { public: vector< ...