在vim拆分窗格之间导航的更简单方法 [英] easier way to navigate between vim split panes

查看:57
本文介绍了在vim拆分窗格之间导航的更简单方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vim上使用NERDTree,通常使用i

I am using NERDTree on vim and usually open files with i

是否有一种简单的方法可以在不同的窗格之间进行切换?目前,我使用CTRL+W+W从一个窗格移动到另一个窗格.

Is there an easy way to switch between different panes? Currently I use CTRL+W+W to move from one pane to another.

推荐答案

很久以前,我发现了提示(曾经在vim.org上,现在在wikia上).重新映射ctrl-[hjkl]导航拆分.它对我很好.

Long ago I found a tip (once on vim.org, now on wikia, apparently) that I've stuck with. Remap ctrl-[hjkl] to navigate splits. It has served me well.

" Use ctrl-[hjkl] to select the active split!
nmap <silent> <c-k> :wincmd k<CR>
nmap <silent> <c-j> :wincmd j<CR>
nmap <silent> <c-h> :wincmd h<CR>
nmap <silent> <c-l> :wincmd l<CR>

这篇关于在vim拆分窗格之间导航的更简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆