vim插件之MiniBufExplorer
来源:互联网 发布:linux 如何查看nat 编辑:程序博客网 时间:2024/06/05 16:53
当只编辑一个buffer的时候MiniBufExplorer不起作用, 当打开第二个buffer的时候, MiniBufExplorer窗口就自动弹出来了, 见下图:
上面最左侧的窗口就是MiniBufExplorer窗口, 其中列出了当前所有已经打开的buffer, 当你把光标置于这个窗口时, 有下面几个快捷键可以用:
<Tab> 向前循环切换到每个buffer名上
<S-Tab> 向后循环切换到每个buffer名上
<Enter> 在打开光标所在的buffer
d 删除光标所在的buffer
以下的两个功能需要在~/.vimrc中增加:
let g:miniBufExplMapCTabSwitchBufs = 1
<C-Tab> 向前循环切换到每个buffer上,并在当前窗口打开
<C-S-Tab> 向后循环切换到每个buffer上,并在当前窗口打开;
注:MiniBufExplore默认是这两个快捷键,可是在ubuntu10.04中不能使用,原因可能是bash中已经定义了ctrl+tab快捷键。所以我们可以更换此快捷键在~/.vim/plugin/minibufexpl.vim中找到:
noremap <C-TAB> :call <SID>CycleBuffer(1)<CR>:<BS>
noremap <C-S-TAB> :call <SID>CycleBuffer(0)<CR>:<BS>
重新定义成自己的map即可。
在~/.vimrc中设置:
let g:miniBufExplMapWindowNavVim = 1
则可以用<C-h,j,k,l>切换到上下左右的窗口中去。
在~/.vimrc中设置:
let g:miniBufExplMapWindowNavArrows = 1
是用<C-箭头键>切换到上下左右窗口中去
以下是MiniBufExplorer的几个命令:
:MiniBufExplorer " Open and/or goto Explorer
:CMiniBufExplorer " Close the Explorer if it's open
:UMiniBufExplorer " Update Explorer without naviting
:TMiniBufExplorer " Toggle the Explorer window open and closed
如果在.vimrc中配置了mapleader,如
let mapleader = "," "Set mapleader
就可以在normal模式下用,mbc代替 :CMiniBufExplorer命令
其他命令为:
:MiniBufExplorer ,mbe
:CMiniBufExplorer ,mbc
:UMiniBufExplorer ,mbu
:TMiniBufExplorer ,mbt
相关设置:
- """"""""""""""""""""""""""""""
- " miniBufexplorer Config
- """"""""""""""""""""""""""""""
- let g:miniBufExplMapWindowNavArrows = 1
- let g:miniBufExplMapWindowNavVim = 1
- let g:miniBufExplMapCTabSwitchWindows = 1
- "let g:miniBufExplMapCTabSwitchBufs = 1
- let g:miniBufExplModSelTarget = 1
- "解决FileExplorer窗口变小问题
- let g:miniBufExplForceSyntaxEnable = 1
- let g:miniBufExplorerMoreThanOne=2
在命令模式下:
:bn 打开当前buffer的下一个buffer
:bp 打开当前buffer的前一个buffer
:b"num" 打开指定的buffer,"num"指的是buffer开始的那个数字,比如上图,我想打开list_audit.erb,输入:b7就ok了
- vim插件之MiniBufExplorer
- MiniBufExplorer插件的使用
- MiniBufExplorer插件的使用
- MiniBufExplorer
- 快速浏览和操作Buffer -- 插件: MiniBufExplorer 下载地址 [http://www.vim.org/scripts/script.php?script_id=159] 版
- VIM IDE搭建(四)--miniBufexplorer
- VIM插件之NERD_comments.vim
- Vim插件之vim-flake8
- Vim插件之vim-autoformat
- Vim插件之vim-signature
- Vim插件之vim-workspace
- Vim插件之vim-airline
- Vim插件之vim-surround
- Vim插件之vim-commentary
- Vim插件之vim-polyglot
- Vim插件之investigate.vim
- Vim插件之vim-man
- Vim插件之ack.vim
- 带你吃透RTMP
- spark randomSplit glom函数操作详解
- Activity 启动模式
- kylin2.0之spark构建cube
- SQL SERVER 清除日志
- vim插件之MiniBufExplorer
- WKWebView
- golang数组
- [日推荐]『口红IN』女票生气了怎么哄?这里有妙招!
- 分布式计算、并行计算及集群、网格、云计算的区别
- 快速排序与冒泡排序(面试题)
- 关于TCP/IP,必知必会的十个问题
- LintCode算法题解——栅栏染色、二叉树所有路径、快乐数、Rotate Words、等价二叉树
- 巧用二重积分的积分中值定理