惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
B
Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
Vercel News
Vercel News
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
T
Threatpost
Security Latest
Security Latest
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
I
Intezer
P
Privacy International News Feed
D
Docker
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
A
Arctic Wolf
IT之家
IT之家
S
SegmentFault 最新的问题
S
Securelist
博客园 - 叶小钗
N
News and Events Feed by Topic
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
Hacker News: Ask HN
Hacker News: Ask HN
博客园 - Franky
GbyAI
GbyAI
AI
AI
Y
Y Combinator Blog
WordPress大学
WordPress大学
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
N
News | PayPal Newsroom
The Cloudflare Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
I
InfoQ

博客园 - XiaoHui

windbg tips windbg无法下载pdb调试符号 python连接数据库 unix/linux tips freebsd中xorg 7.4键盘反应迟顿的问题 Django升级到1.0以后的一些变化 ubuntu安装新字体 诡异的修改首页--00333.cn/alei.htm 使用nmap扫描内网在线机器的MAC地址 rtorrent无法完全支持中文的解决办法 EFLAGES寄存器中的系统标志 How to manually create a crash dump file 因网络限制而无法连接MS的symbol服务器的解决办法 NEG+SBB指令组合的用处 Nt*与Zw*的区别 Image与Base64String的互转换 编程实现清除temp1.exe,temp2.exe木马 类似Acdsee的东东,不过是用.NET的。 AIHear 0.1.2
[转载]HOWTO 使用 vim 的 minibuf 来切换缓冲区 - XiaoHui
XiaoHui · 2009-06-15 · via 博客园 - XiaoHui

转载自:http://linux.bloghome.cn/posts/114.html

1. 安装到 http://vim.sourceforge.net/scripts/script.php?script_id=159

下载最新版本的 minibufexpl.vim 脚本,
将该文件复制到 plugin 目录中即可。

2. 配置
在配置文件 .vimrc 中加入:
"
"minibuf plugin
"
let g:miniBufExplMapWindowNavVim = 1 "Ctrl-<hjkl> to move to window 
let g:miniBufExplTabWrap = 1 " make tabs show complete (no broken on two lines)

这样就可以使用 minibuf 了,而且设定 Ctrl-h/j/k/l 在各个窗口中切换,很方便。
使用提示:
1. minibuf 占用的就是一个窗口,你可以用 Ctrl-k 切换到其上,然后按 <tab> 循环选择 buffer,
按 <enter> 则激活该 buffer,按 d 则删除该 buffer 。
2. 每个 buffer 名称前都有个数字,那是 buffer 的编号,因此,可以输入 :b <buffer编号> 来快速切换。

先自声明,本人是个懒种,因此设定了几个快捷键:
<F1> 切换至前一缓冲区
<F2> 切换至后一缓冲区
<F3> 保存缓冲区(:update 罗)
<F4> 关闭缓冲区(:bd,或 :bdelete,删除缓冲区)
脚本如下:

nnoremap <F1> :call MyCyclebuffer(0)<CR>
nnoremap 
<Leader>1 :call MyCyclebuffer(0)<CR>
inoremap 
<F1> <ESC>:call MyCyclebuffer(0)<CR>
nnoremap 
<F2> :call MyCyclebuffer(1)<CR>
nnoremap 
<Leader>2 :call MyCyclebuffer(1)<CR>
inoremap 
<F2> <ESC>:call MyCyclebuffer(1)<CR>
" Cycle Through buffers 
"
 from MiniBufExplorer, modified by DJW
function! MyCyclebuffer(forward)
" Change buffer (keeping track of before and after buffers)
let l:origBuf = bufnr(''%'')
if (a:forward == 1)
bn
!
else
bp
!
endif
let l:curBuf 
= bufnr(''%'')
" Skip any non-modifiable buffers, but don''t cycle forever
"
 This should stop us from stopping in any of the [Explorers]
while getbufvar(l:curBuf, ''&modifiable''== 0 && l:origBuf != l:curBuf
if (a:forward == 1)
bn
!
else
bp
!
endif
let l:curBuf 
= bufnr(''%'')
endwhile
endfunction
" <F4> delete buffer
nnoremap <F4> :bd<CR>
nnoremap 
<Leader>4 :bd<CR>
inoremap 
<F4> <ESC>:bd<CR>" <F3> or Ctrl-S update buffer
nnoremap <C-S> :update<CR>
inoremap 
<C-S> <C-O>:update<CR>
vnoremap 
<C-S> <C-C>:update<CR>
nnoremap 
<F3> :update<CR>
inoremap 
<F3> <C-O>:update<CR>